Class NT
java.lang.Object
org.episteme.social.linguistics.loaders.tigerxml.GraphNode
org.episteme.social.linguistics.loaders.tigerxml.NT
- All Implemented Interfaces:
Serializable, Identified<Identification>
- Direct Known Subclasses:
VRoot
Represents a non-terminal node in a syntax tree.
Non-terminal nodes (NT) represent syntactic units (categories) such as NP (Noun Phrase), VP (Verb Phrase), etc. They contain other nodes (daughters) which can be either terminals (T) or non-terminals (NT).
* @see GraphNode- Since:
- 1.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
- See Also:
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDaughter(GraphNode daughter) voidaddSecDaughter(GraphNode daughter) protected voidbuildTreeString(int depth, StringBuilder sb) getAllDaughtersByLabel(String label) getCat()Returns primary daughters sorted by linear precedence.getDaughtersByLabel(String label) getSpan()Returns a compact MMAX-style span of all terminal IDs.Recursively collects all terminal nodes in this subtree.getText()booleanvoidprint2XML(FileWriter out) voidMethods inherited from class GraphNode
after, before, dominates, equals, getCorpus, getDescendantsByLabel, getDominatingNodeByCat, getEdge2Mother, getEdge2SecMother, getId, getIndex, getLeftmostTerminal, getMother, getPath, getSecMothers, getSentence, getVerbosity, hashCode, hasMother, hasSecMothers, isDominatedBy, isDominatedBy, setEdge2Mother, setId, setId, setIndex, setMother, setSecMother, setSentence, setVerbosity, toString, toTreeString
-
Constructor Details
-
NT
public NT()Creates an empty NT node. -
NT
-
NT
-
-
Method Details
-
isTerminal
public boolean isTerminal()- Specified by:
isTerminalin classGraphNode
-
setCat
-
getCat
-
getSpan
Returns a compact MMAX-style span of all terminal IDs.- Returns:
- the span string (e.g., "s1_1..s1_5").
-
addDaughter
-
addSecDaughter
-
getDaughters
-
getSecDaughters
-
getAllDaughters
-
getTerminals
-
getText
-
getDaughtersByLabel
-
getAllDaughtersByLabel
-
buildTreeString
- Specified by:
buildTreeStringin classGraphNode
-
print2XML
- Throws:
IOException
-