Difference between revisions of "DicLookUp"

From Apertium
Jump to navigation Jump to search
m
 
(6 intermediate revisions by 3 users not shown)
Line 1: Line 1:
[[Utilisation de DicLookUp|En français]]

{{Github-unmigrated-tool}}
== Getting DicLookUp ==

$ svn co https://svn.code.sf.net/p/apertium/svn/trunk/apertium-tools/apertium-diclookup

$ cd apertium-diclookup

$ firefox lookup.html &

== Generating dictionaries for DicLookUp ==
== Generating dictionaries for DicLookUp ==


DicLookUp needs dictionaries in a special form ([http://en.wikipedia.org/wiki/Trie Trie]). There is a task in [[Crossdics|apertium-dictools]] that can convert from Apertium dix files into trie-dictionaries.
DicLookUp needs dictionaries in a special form ([http://en.wikipedia.org/wiki/Trie Trie]). There is a task in [[Crossdics|apertium-dictools]] that can convert from Apertium dix files into trie-dictionaries.


$ apertium-dictools dic2trie <dic> <lr|rl> [<out>]
$ apertium-dixtools dix2trie <dic> <lr|rl> [<out>]


$ apertium-dictools dic2trie apertium-sl-tl.sl-tl.dix '''lr''' sl-tl-lr-trie.xml
$ apertium-dixtools dix2trie apertium-sl-tl.sl-tl.dix '''lr''' sl-tl-lr-trie.xml
$ apertium-dictools dic2trie apertium-sl-tl.sl-tl.dix '''rl''' sl-tl-rl-trie.xml
$ apertium-dixtools dix2trie apertium-sl-tl.sl-tl.dix '''rl''' sl-tl-rl-trie.xml


For example, for Spanish-Catalan dictionaries:
For example, for Spanish-Catalan dictionaries:


$ apertium-dictools dic2trie apertium-es-ca.es-ca.dix '''lr''' es-ca-lr-trie.xml
$ apertium-dixtools dix2trie apertium-es-ca.es-ca.dix '''lr''' es-ca-lr-trie.xml
$ apertium-dictools dic2trie apertium-es-ca.es-ca.dix '''rl''' es-ca-rl-trie.xml
$ apertium-dixtools dix2trie apertium-es-ca.es-ca.dix '''rl''' es-ca-rl-trie.xml


Then, to make them work on the [[Apertium website]], put the trie-files in <code>webspace/common/xml</code>
Then, to make them work on the [[Apertium website]], put the trie-files in <code>webspace/common/xml</code>
Line 18: Line 29:
$ cp es-ca-rl-trie.xml webspace/common/xml
$ cp es-ca-rl-trie.xml webspace/common/xml



[[Category:Documentation]]
[[Category:Documentation in English]]

Latest revision as of 03:01, 10 March 2018

En français

Note: After Apertium's migration to GitHub, this tool is read-only on the SourceForge repository and does not exist on GitHub. If you are interested in migrating this tool to GitHub, see Migrating tools to GitHub.

Getting DicLookUp[edit]

$ svn co https://svn.code.sf.net/p/apertium/svn/trunk/apertium-tools/apertium-diclookup
$ cd apertium-diclookup
$ firefox lookup.html &

Generating dictionaries for DicLookUp[edit]

DicLookUp needs dictionaries in a special form (Trie). There is a task in apertium-dictools that can convert from Apertium dix files into trie-dictionaries.

$ apertium-dixtools dix2trie <dic> <lr|rl> [<out>]
$ apertium-dixtools dix2trie apertium-sl-tl.sl-tl.dix lr sl-tl-lr-trie.xml
$ apertium-dixtools dix2trie apertium-sl-tl.sl-tl.dix rl sl-tl-rl-trie.xml

For example, for Spanish-Catalan dictionaries:

$ apertium-dixtools dix2trie apertium-es-ca.es-ca.dix lr es-ca-lr-trie.xml
$ apertium-dixtools dix2trie apertium-es-ca.es-ca.dix rl es-ca-rl-trie.xml

Then, to make them work on the Apertium website, put the trie-files in webspace/common/xml

$ cp es-ca-lr-trie.xml webspace/common/xml
$ cp es-ca-rl-trie.xml webspace/common/xml