Difference between revisions of "Kashmiri/FST Ideas"

From Apertium
Jump to navigation Jump to search
(Created page with "<pre> $ cat /tmp/hargle.lexc Multichar_Symbols %<n%> %<sg%> %<pl%> %<nom%> %<erg%> %<dat%> %<abl%> %{u%} LEXICON Root Nouns ; LEXICON CASE-PL %<nom%>:%>i # ; %<erg%>:%>yav # ...")
 
 
Line 1: Line 1:
  +
Toy lexc:
 
<pre>
 
<pre>
 
$ cat /tmp/hargle.lexc
 
 
Multichar_Symbols
 
Multichar_Symbols
 
%<n%> %<sg%> %<pl%>
 
%<n%> %<sg%> %<pl%>
Line 23: Line 22:
 
LEXICON Nouns
 
LEXICON Nouns
 
koor:k%{u%}or N ;
 
koor:k%{u%}or N ;
  +
</pre>
http://www.thedailymash.co.uk/features/are-you-possessed-20180626174632
 
  +
Toy twol:
hahahaha
 
  +
<pre>
S
 
spectei 13:38:37
 
LOL:
 
Make it like a Famous Five picnic by taking ginger beer, describing things as ‘queer’ and constantly being on the lookout for smugglers/anyone who isn’t a posh English person.
 
vin-ivar, --^
 
F
 
@fotonzade 13:38:44
 
:D
 
ok how would the twol work spectei?
 
S
 
spectei 13:43:13
 
'sec
 
S
 
spectei 13:44:24
 
 
Alphabet
 
Alphabet
 
a b c d e f g h i j k l m n o p q r s t u v w x y z
 
a b c d e f g h i j k l m n o p q r s t u v w x y z
Line 51: Line 37:
 
%{u%}:o <=> _ Vow Cns+ .#. ;
 
%{u%}:o <=> _ Vow Cns+ .#. ;
 
..
 
..
  +
</pre>
  +
Compile and test:
  +
<pre>
 
$ hfst-lexc /tmp/hargle.lexc | hfst-compose-intersect -1 - -2 /tmp/hargle.twol.hfst | hfst-fst2strings
 
$ hfst-lexc /tmp/hargle.lexc | hfst-compose-intersect -1 - -2 /tmp/hargle.twol.hfst | hfst-fst2strings
 
hfst-lexc: warning: Defaulting to OpenFst tropical type
 
hfst-lexc: warning: Defaulting to OpenFst tropical type

Latest revision as of 16:45, 26 June 2018

Toy lexc:

Multichar_Symbols
%<n%> %<sg%> %<pl%>
%<nom%> %<erg%> %<dat%> %<abl%>
%{u%}
LEXICON Root
Nouns ;
LEXICON CASE-PL
%<nom%>:%>i # ;
%<erg%>:%>yav # ;
%<dat%>:%>yan # ;
%<abl%>:%>yav # ;
LEXICON CASE-OBL
%<erg%>: # ;
%<dat%>: # ;
%<abl%>: # ;
LEXICON N
%<n%>%<sg%>%<nom%>: # ;
%<n%>%<sg%>:%>i     CASE-OBL ;
%<n%>%<pl%>:        CASE-PL ;
LEXICON Nouns
koor:k%{u%}or N ;

Toy twol:

Alphabet
a b c d e f g h i j k l m n o p q r s t u v w x y z
%{u%}:u %{u%}:o
%>:0
;
Sets
Vow = a e i o u ;
Cns = b c d f g h j k l m n p q r s t v w x y z ;
Rules
"Assimilation in bare stem"
%{u%}:o <=> _ Vow Cns+ .#. ;
..

Compile and test:

$ hfst-lexc /tmp/hargle.lexc | hfst-compose-intersect -1 - -2 /tmp/hargle.twol.hfst | hfst-fst2strings
hfst-lexc: warning: Defaulting to OpenFst tropical type
Root...1 CASE-PL...4 CASE-OBL...3 N...3 Nouns...
koor<n><sg><nom>:koor
koor<n><pl><nom>:kuori
koor<n><pl><erg>:kuoryav
koor<n><pl><dat>:kuoryan
koor<n><pl><abl>:kuoryav
koor<n><sg><erg>:kuori
koor<n><sg><dat>:kuori
koor<n><sg><abl>:kuori