Package org.languagetool.synthesis
Class ManualSynthesizer
java.lang.Object
org.languagetool.synthesis.ManualSynthesizer
A synthesizer that reads the inflected form and POS information from a plain (UTF-8) text file.
This makes it possible for the user to edit the text file to let the system know
about new words or missing readings in the synthesizer *.dict file.
File Format: fullform baseform postags (tab separated)
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionRetrieve all the possible POS values.private ManualSynthesizer.MappingAndTags
loadMapping
(InputStream inputStream, String encoding) Look up a word's inflected form as specified by the lemma and POS tag.
-
Field Details
-
mapping
a map with the key composed by the lemma and POS (separated by "|"). The values are lists of inflected forms. -
possibleTags
-
-
Constructor Details
-
ManualSynthesizer
- Throws:
IOException
-
-
Method Details
-
getPossibleTags
Retrieve all the possible POS values. -
lookup
Look up a word's inflected form as specified by the lemma and POS tag.- Parameters:
lemma
- the lemma to inflect.posTag
- the required POS tag.- Returns:
- a list with all the inflected forms of the specified lemma having the specified POS tag.
If no inflected form is found, the function returns
null
.
-
loadMapping
private ManualSynthesizer.MappingAndTags loadMapping(InputStream inputStream, String encoding) throws IOException - Throws:
IOException
-