public abstract class EntryFactory extends Object
WiktionaryEntry
s used by the parsers.Constructor and Description |
---|
EntryFactory() |
Modifier and Type | Method and Description |
---|---|
WiktionaryEntry |
createEntry(ParsingContext context)
Create a new
WiktionaryEntry based on the current context. |
WiktionaryEntry |
findEntry(ParsingContext context)
Checks if the current page contains a
WiktionaryEntry
matching for the current context (part of speech, language, etc.)
and returns it. |
abstract PartOfSpeech |
findPartOfSpeech(String name)
Converts the given string into a part of speech enum type.
|
public WiktionaryEntry findEntry(ParsingContext context)
WiktionaryEntry
matching for the current context (part of speech, language, etc.)
and returns it. If no entry could be found, a new one is created
(using createEntry(ParsingContext)
).public WiktionaryEntry createEntry(ParsingContext context)
WiktionaryEntry
based on the current context.
This method always creates a new entry. Use
findEntry(ParsingContext)
if you want to use existing
entries (which is usually the case).public abstract PartOfSpeech findPartOfSpeech(String name)
Copyright © 2011-2016 Ubiquitous Knowledge Processing (UKP) Lab. All Rights Reserved.