Difference between revisions of "Freeling"

From Apertium
Jump to navigation Jump to search
Line 14: Line 14:
 
<pre>
 
<pre>
 
$ echo "Bro gozh ma zadoù" | lt-proc br-fr.automorf.bin | cg-proc br-fr.rlx.bin | apertium-tagger -p -g br-fr.prob
 
$ echo "Bro gozh ma zadoù" | lt-proc br-fr.automorf.bin | cg-proc br-fr.rlx.bin | apertium-tagger -p -g br-fr.prob
  +
 
^Bro/Bro<n><f><sg>$ ^gozh/kozh<adj><mf><sp>$ ^ma/ma<det><pos><mf><sp>$ ^zadoù/tad<n><m><pl>$
 
^Bro/Bro<n><f><sg>$ ^gozh/kozh<adj><mf><sp>$ ^ma/ma<det><pos><mf><sp>$ ^zadoù/tad<n><m><pl>$
   
 
$ echo "Bro gozh ma zadoù" | lt-proc br-fr.automorf.bin | cg-proc br-fr.rlx.bin | apertium-tagger -p -g br-fr.prob | \
 
$ echo "Bro gozh ma zadoù" | lt-proc br-fr.automorf.bin | cg-proc br-fr.rlx.bin | apertium-tagger -p -g br-fr.prob | \
 
tagger-to-freeling.py parole-tags.txt
 
tagger-to-freeling.py parole-tags.txt
  +
 
Bro Bro NCFSV0
 
Bro Bro NCFSV0
 
gozh kozh AQ0CN0
 
gozh kozh AQ0CN0
Line 25: Line 27:
 
$ echo "Bro gozh ma zadoù" | lt-proc br-fr.automorf.bin | cg-proc br-fr.rlx.bin | apertium-tagger -p -g br-fr.prob | \
 
$ echo "Bro gozh ma zadoù" | lt-proc br-fr.automorf.bin | cg-proc br-fr.rlx.bin | apertium-tagger -p -g br-fr.prob | \
 
tagger-to-freeling.py parole-tags.txt | fl-chunker -f br.cfg
 
tagger-to-freeling.py parole-tags.txt | fl-chunker -f br.cfg
  +
 
sn_[
 
sn_[
 
+grup-n_[
 
+grup-n_[

Revision as of 13:17, 26 December 2008

Freeling is a suite of language processing tools, including a tokeniser, sentence splitter, morphological analyser, chunker and dependency parser. Much of this is also done in lttoolbox and apertium, but in some cases data or tools from Freeling could be useful.

Tools

There are some scripts in apertium SVN (module apertium-tools/freeling) for converting between apertium formats and Freeling formats.

  • dix-to-maco.py -- Convert between an lttoolbox expanded dictionary and a Freeling 'maco' format full-form list.
  • tagger-to-parole.py -- Convert between the output of apertium-tagger to Freeling style tagged output.

Both scripts require a file with correspondences between apertium tags and PAROLE style tags.

Example

$ echo "Bro gozh ma zadoù" | lt-proc br-fr.automorf.bin  | cg-proc br-fr.rlx.bin  | apertium-tagger -p -g br-fr.prob  

^Bro/Bro<n><f><sg>$ ^gozh/kozh<adj><mf><sp>$ ^ma/ma<det><pos><mf><sp>$ ^zadoù/tad<n><m><pl>$

$ echo "Bro gozh ma zadoù" | lt-proc br-fr.automorf.bin  | cg-proc br-fr.rlx.bin  | apertium-tagger -p -g br-fr.prob  | \
  tagger-to-freeling.py parole-tags.txt 

Bro Bro NCFSV0
gozh kozh AQ0CN0
ma ma DP0CN0
zadoù tad NCMPV0

$ echo "Bro gozh ma zadoù" | lt-proc br-fr.automorf.bin  | cg-proc br-fr.rlx.bin  | apertium-tagger -p -g br-fr.prob  | \
  tagger-to-freeling.py parole-tags.txt | fl-chunker -f br.cfg

sn_[
  +grup-n_[
    +(Bro Bro NCFSV0 -)
     (gozh kozh AQ0CN0 -)
    ]
  ]
  det_[
    +(ma ma DP0CN0 -)
  ]
  grup-n_[
    +(zadoù tad NCMPV0 -)
  ]
]

External links