| Package | Description |
|---|---|
| simplenlg.framework | |
| simplenlg.lexicon |
| Modifier and Type | Method and Description |
|---|---|
static LexicalCategory |
LexicalCategory.valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static LexicalCategory[] |
LexicalCategory.values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
| Modifier and Type | Method and Description |
|---|---|
NLGElement |
NLGFactory.createInflectedWord(Object word,
LexicalCategory category)
Create an inflected word element.
|
NLGElement |
NLGFactory.createNLGElement(Object element,
LexicalCategory category)
this method creates an NLGElement from an object If object is null,
return null If the object is already an NLGElement, it is returned
unchanged Exception: if it is an InflectedWordElement, return underlying
WordElement If it is a String which matches a lexicon entry or pronoun,
the relevant WordElement is returned If it is a different String, a
wordElement is created if the string is a single word Otherwise a
StringElement is returned Otherwise throw an exception
|
NLGElement |
NLGFactory.createWord(Object word,
LexicalCategory category)
Creates a new element representing a word.
|
| Constructor and Description |
|---|
InflectedWordElement(String word,
LexicalCategory category)
Constructs a new inflected word using the giving word as the base form.
|
WordElement(String baseForm,
LexicalCategory category)
create a WordElement with the specified baseForm and category
|
WordElement(String baseForm,
LexicalCategory category,
String id)
create a WordElement with the specified baseForm, category, ID
|
| Modifier and Type | Method and Description |
|---|---|
protected WordElement |
Lexicon.createWord(String baseForm,
LexicalCategory category)
create a default WordElement.
|
WordElement |
Lexicon.getWord(String baseForm,
LexicalCategory category)
get a WordElement which has the specified base form and category
|
WordElement |
Lexicon.getWordFromVariant(String variant,
LexicalCategory category)
returns a WordElement which has the specified inflected form and/or
spelling variant that matches the specified variant, of the specified
category
|
List<WordElement> |
NIHDBLexicon.getWords(String baseForm,
LexicalCategory category) |
abstract List<WordElement> |
Lexicon.getWords(String baseForm,
LexicalCategory category)
returns all Words which have the specified base form and category
|
List<WordElement> |
MultipleLexicon.getWords(String baseForm,
LexicalCategory category) |
List<WordElement> |
XMLLexicon.getWords(String baseForm,
LexicalCategory category) |
List<WordElement> |
NIHDBLexicon.getWordsFromVariant(String variant,
LexicalCategory category) |
abstract List<WordElement> |
Lexicon.getWordsFromVariant(String variant,
LexicalCategory category)
returns Words which have an inflected form and/or spelling variant that
matches the specified variant, and are in the specified category.
|
List<WordElement> |
MultipleLexicon.getWordsFromVariant(String variant,
LexicalCategory category) |
List<WordElement> |
XMLLexicon.getWordsFromVariant(String variant,
LexicalCategory category) |
boolean |
Lexicon.hasWord(String baseForm,
LexicalCategory category)
return
true if the lexicon contains a WordElement which has
the specified base form and category |
boolean |
Lexicon.hasWordFromVariant(String variant,
LexicalCategory category)
return
true if the lexicon contains a WordElement which
matches the specified variant form and category |
WordElement |
Lexicon.lookupWord(String baseForm,
LexicalCategory category)
General word lookup method, tries base form, variant, ID (in this order)
Creates new word if can't find existing word
|
Copyright © 2020. All Rights Reserved.