Package opennlp.tools.formats.conllu
Class ConlluWordLine
java.lang.Object
opennlp.tools.formats.conllu.ConlluWordLine
-
Method Summary
-
Method Details
-
getId
- Returns:
- Retrieves the word index. An Integer starting at
1
for each new sentence; may be a range for multiword tokens; may be a decimal number for empty nodes.
-
getForm
- Returns:
- Retrieves the word form or punctuation symbol.
-
getLemma
- Returns:
- Retrieves the lemma or stem of the word form.
-
getPosTag
- Parameters:
tagset
- Thetype of tag
to retrieve, either universal (ConlluTagset.U
) or language specific (ConlluTagset.X
).- Returns:
- Retrieves the Universal part-of-speech tag or the language-specific part-of-speech tag; underscore if not available.
- Throws:
IllegalStateException
- Thrown if a non-supportedConlluTagset
was specified.
-
getFeats
- Returns:
- Retrieves morphological features from the universal feature inventory or from a defined language-specific extension; underscore if not available.
-
getHead
- Returns:
- Retrieves the head of the current word, which is either a value of ID or zero (0).
-
getDeprel
- Returns:
- Retrieves the Universal dependency relation to the HEAD (root if HEAD = 0) or a defined language-specific subtype of one.
-
getDeps
- Returns:
- Retrieves the enhanced dependency graph in the form of a list of head-deprel pairs.
-
getMisc
- Returns:
- Retrieves any other annotation.
-