Class OrthographyBuilder
java.lang.Object
ca.phon.extensions.ExtendableObject
ca.phon.orthography.OrthographyBuilder
- All Implemented Interfaces:
IExtendable
Class for building
Orthography
from various sources. This class
is not thread-safe.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionannnotateWord
(Langs langs, WordPrefix wordPrefix, WordSuffix wordSuffix, UntranscribedType untranscribedType) Annotate the previously added word with the given prefix, suffix and untranscribedTypeappend
(Orthography ortho) append
(OrthographyElement ele) appendCompoundWord
(Word word1, Word word2, CompoundWordMarkerType marker) appendTagMarker
(TagMarkerType tmType) appendWord
(WordElement... wordElements) appendWord
(WordPrefix prefix, WordElement... wordElements) appendWord
(WordPrefix prefix, WordSuffix suffix, UntranscribedType untranscribedType, WordElement... wordElements) appendWord
(WordPrefix prefix, WordSuffix suffix, UntranscribedType untranscribedType, List<WordElement> wordElements) appendWord
(WordPrefix prefix, WordSuffix suffix, WordElement... wordElements) appendWord
(WordPrefix prefix, WordSuffix suffix, List<WordElement> wordElements) appendWord
(WordPrefix prefix, List<WordElement> wordElements) appendWord
(WordSuffix suffix, WordElement... wordElements) appendWord
(WordSuffix suffix, List<WordElement> wordElements) appendWord
(String data) appendWord
(String data, WordFormType suffix) appendWord
(String data, WordType prefix) appendWord
(String data, WordType prefix, WordFormType suffix) appendWord
(String data, WordType prefix, WordFormType suffix, UntranscribedType untranscribed) appendWord
(List<WordElement> wordElements) clear()
Creates a wordnet using the last two elements.Creates a wordnet using the last two elements.createCompoundWord
(Word word2, CompoundWordMarkerType marker) Creates a wordnet using the previously added word and the given word.elementAt
(int idx) reverse()
int
size()
Methods inherited from class ca.phon.extensions.ExtendableObject
getExtension, getExtensions, putExtension, removeExtension
-
Constructor Details
-
OrthographyBuilder
public OrthographyBuilder()
-
-
Method Details
-
clear
-
append
-
append
-
append
- Parameters:
txt
-- Returns:
- Throws:
IllegalArgumentException
- if txt could not be compiled
-
appendWord
public OrthographyBuilder appendWord(String data, WordType prefix, WordFormType suffix, UntranscribedType untranscribed) -
appendWord
-
appendWord
-
appendWord
-
appendWord
-
appendWord
-
appendWord
-
appendWord
-
appendWord
public OrthographyBuilder appendWord(WordPrefix prefix, WordSuffix suffix, WordElement... wordElements) -
appendWord
public OrthographyBuilder appendWord(WordPrefix prefix, WordSuffix suffix, UntranscribedType untranscribedType, WordElement... wordElements) -
appendWord
-
appendWord
-
appendWord
-
appendWord
public OrthographyBuilder appendWord(WordPrefix prefix, WordSuffix suffix, List<WordElement> wordElements) -
appendWord
public OrthographyBuilder appendWord(WordPrefix prefix, WordSuffix suffix, UntranscribedType untranscribedType, List<WordElement> wordElements) -
appendTagMarker
-
appendCompoundWord
-
createCompoundWord
Creates a wordnet using the previously added word and the given word.- Parameters:
word2
-marker
-- Returns:
- Throws:
IllegalStateException
- if the previous element is not anWord
or the element list is empty
-
createCompoundWord
Creates a wordnet using the last two elements.- Parameters:
marker
-- Returns:
- Throws:
IllegalStateException
- if the previous two elements are notWord
s or the element list is empty
-
createCompoundWord
Creates a wordnet using the last two elements.- Returns:
- Throws:
IllegalStateException
- if the previous two elements are notWord
s or the element list is empty
-
annnotateWord
public OrthographyBuilder annnotateWord(Langs langs, WordPrefix wordPrefix, WordSuffix wordSuffix, UntranscribedType untranscribedType) Annotate the previously added word with the given prefix, suffix and untranscribedType- Parameters:
wordPrefix
-wordSuffix
-untranscribedType
-- Returns:
-
size
public int size() -
elementAt
-
lastElement
-
replaceLastElement
-
reverse
-
getElements
-
toOrthography
-