Package com.basistech.rosette.dm
Class ArabicMorphoAnalysis.Builder
java.lang.Object
com.basistech.rosette.dm.BaseAttribute.Builder<MorphoAnalysis,MorphoAnalysis.Builder<T,B>>
com.basistech.rosette.dm.MorphoAnalysis.Builder<ArabicMorphoAnalysis,ArabicMorphoAnalysis.Builder>
com.basistech.rosette.dm.ArabicMorphoAnalysis.Builder
- Enclosing class:
- ArabicMorphoAnalysis
public static class ArabicMorphoAnalysis.Builder
extends MorphoAnalysis.Builder<ArabicMorphoAnalysis,ArabicMorphoAnalysis.Builder>
Builder class for
ArabicMorphoAnalysis
.-
Field Summary
Fields inherited from class com.basistech.rosette.dm.MorphoAnalysis.Builder
components, lemma, partOfSpeech, raw, tagSet
-
Constructor Summary
ConstructorsConstructorDescriptionBuilder()
Constructs an empty builder.Builder
(ArabicMorphoAnalysis toCopy) Constructs a builder from an existing analysis. -
Method Summary
Modifier and TypeMethodDescriptionAdds a prefix.Adds a stem.Adds a suffix.build()
Constructs the analysis from the current state of the builder.definiteArticle
(boolean definiteArticle) Specifies whether the word has an attached definite article.lengths
(int prefixLength, int stemLength) Sets the decomposition lengths.Set all the prefixes and their tags.Sets the root for the word.Set all the stems and their tags.strippablePrefix
(boolean strippablePrefix) Specifies whether the prefixes are strippable (e.g.Set all the suffixes and their tags.Methods inherited from class com.basistech.rosette.dm.MorphoAnalysis.Builder
addComponent, components, getThis, lemma, partOfSpeech, raw, tagSet
Methods inherited from class com.basistech.rosette.dm.BaseAttribute.Builder
addAllToList, addAllToSet, buildExtendedProperties, extendedProperties, extendedProperty, nullOrList
-
Constructor Details
-
Builder
public Builder()Constructs an empty builder. -
Builder
Constructs a builder from an existing analysis.- Parameters:
toCopy
- the analysis to copy.
-
-
Method Details
-
lengths
Sets the decomposition lengths. The suffix length is implied by the other two.- Parameters:
prefixLength
- the number of characters in the prefixstemLength
- the number of characters in the stem- Returns:
- this
-
root
Sets the root for the word.- Parameters:
root
- the root, according to semitic linguistics- Returns:
- this
-
definiteArticle
Specifies whether the word has an attached definite article.- Parameters:
definiteArticle
- true for a definite article- Returns:
- this
-
strippablePrefix
Specifies whether the prefixes are strippable (e.g. prepositions).- Parameters:
strippablePrefix
- true if strippable- Returns:
- this
-
addPrefix
Adds a prefix.- Parameters:
prefix
- the prefixprefixTag
- the part-of-speech for the prefix- Returns:
- this
-
prefixes
Set all the prefixes and their tags. The two lists must be the same length.- Parameters:
prefixes
- the prefixes.prefixTags
- the tags for the prefixes.- Returns:
- this
-
addStem
Adds a stem.- Parameters:
stem
- the stemstemTag
- the part-of-speech for the stem- Returns:
- this
-
stems
Set all the stems and their tags. The two lists must be the same length.- Parameters:
stems
- the prefixes.stemTags
- the tags for the prefixes.- Returns:
- this
-
addSuffix
Adds a suffix.- Parameters:
suffix
- the suffixsuffixTag
- the part-of-speech for the suffix- Returns:
- this
-
suffixes
Set all the suffixes and their tags. The two lists must be the same length.- Parameters:
suffixes
- the prefixes.suffixTags
- the tags for the prefixes.- Returns:
- this
-
build
Constructs the analysis from the current state of the builder.- Overrides:
build
in classMorphoAnalysis.Builder<ArabicMorphoAnalysis,
ArabicMorphoAnalysis.Builder> - Returns:
- the new analysis object
-