Class TokenMatch
- java.lang.Object
-
- com.gengoai.collection.tree.SimpleSpan
-
- com.gengoai.hermes.extraction.regex.TokenMatch
-
- All Implemented Interfaces:
Span
,Serializable
,Comparable<Span>
public final class TokenMatch extends SimpleSpan implements Serializable
A match from a
TokenRegex
pattern on an input HString.- Author:
- David B. Bracewell
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Document
getDocument()
HString
group()
List<HString>
group(String groupName)
Gets the list of HString associated with a named group.Set<String>
groupNames()
-
Methods inherited from class com.gengoai.collection.tree.SimpleSpan
end, equals, hashCode, length, setEnd, setStart, start, toString
-
-
-
-
Method Detail
-
getDocument
public Document getDocument()
- Returns:
- the document associated with the input text
-
group
public HString group()
- Returns:
- the span of text covering the match
-
group
public List<HString> group(String groupName)
Gets the list of HString associated with a named group.- Parameters:
groupName
- the group name- Returns:
- the list of matches
-
-