Provides a command line interface for interacting with probabilistic dictionaries (PDict objects). It supports the following activities:
-
Create a new dictionary from one or more token delimited input files. The input file must contain 4 columns. The columns are:
sourceterm;type;targetterm;probability;
where type is an arbitrary symbol, such as a part of speech tag.
-
Merge two existing dictionaries into a new dictionary.
-
Subtract an existing dictionary (prune) from a dictionary.
-
Normalize probabilities for all entries
-
Write the dictionary to a token delimited output file.
-
Interactively look up individual entries, which are displayed (unfiltered) to the console device.
These activities are supported in interactive mode and in batch mode via command line parameters.
For interactive mode the commands are:
-
help -- command list.
-
quit -- exit the program.
-
open <dictName> -- open an existing dicitionary.
-
close -- close the open dictionary.
-
stats -- show dictionary vocabulary statistics.
-
dump <outputFile> <delimiter> -- dump the dictionary to outputFile, using delimiter as the separator.
-
look <term> -- lookup term in the dictionary.
-
normalize -- Normalize probabilities for all entries.
-
create <dictName> <inputFile> <delimiter> -- create a new dictionary from an input file. The input file must contain 4 columns. The columns are:
sourceterm;type;targetterm;probability;
where type is an arbitrary symbol, such as a part of speech tag.
-
merge <firstDict> <secondDict> <newName> -- merge firstDict and secondDict into a new dictionary named newName.
-
subtract <dictName> -- Remove all entries in dictName from the current dictionary. Destructively modifies the current dictionary.
For batch mode the command line parameters are:
-
-help -- usage message.
-
-dump <inputDict> <outputFile> <delimiter> -- dump the dictionary inputDict to outputFile, using delimiter as the separator.
-
-look <inputDict> <term> -- lookup term in the dictionary.
-
-normalize <inputDict> -- Normalize probabilities of all entries
-
-create <dictName> <inputFile> <delimiter> -- create a new dictionary from an input file. The input file must contain 4 columns. The columns are:
sourceterm;type;targetterm;probability;
where type is an arbitrary symbol, such as a part of speech tag.
-
-merge <firstDict> <secondDict> <newName> -- merge firstDict and secondDict into a new dictionary named newName
-
-subtract firstDict secondDict -- Remove all entries in secondDict from firstDict. Destructively modifies firstDict
Generated on Tue Jun 15 11:02:58 2010 for Lemur by
1.3.4