lxtransduce, lxmmaplex — XML transducer
lxtransduce is an XML transducer, intended for use in NLP (natural language processing) applications. XPath-based rules are matched against elements in the input document, and when one matches a corresponding rewrite is done. Plain text can also be processed, using regular expressions instead of XPaths; this is useful for tasks such as tokenisation.
The input-file argument may be a URI instead of a filename. If no input-file argument is given, standard input is used.
For details of how to write lxtransduce rule files (grammars), see the lxtransduce manual .
an XPath specifying the element to whose children the rules are applied. This query is streamed.
apply rules recursively.
the rule to be applied at top-level.
bind a lexicon name (default "
lex") to a lexicon file.
lxmmaplex converts lxtransduce lexicons from human-readable XML form into an on-disk hash table. This removes the cost of reading in the lexicon when lxtransduce starts, at the expense of slower lookup (one or more disk accesses per lookup). It is appropriate for lexicons with hundreds of thousands of entries or more.
The file name of the XML lexicon to be converted.
The file name for the hash-table lexicon. The suffix
used to distinguish hash-table lexicons from XML ones.