public class TokenAligner extends Object
Constructor and Description |
---|
TokenAligner()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
static SpanLabelView |
align(String viewName,
edu.illinois.cs.cogcomp.thrift.base.Labeling labeling,
TextAnnotation ta)
Deprecated.
Converts a
Labeling to a SpanLabelView for the input
TextAnnotation . |
static SpanLabelView |
align(String viewName,
edu.illinois.cs.cogcomp.thrift.base.Labeling labeling,
TextAnnotation ta,
boolean allowOverlappingSpans)
Deprecated.
|
static List<Map<edu.illinois.cs.cogcomp.core.datastructures.Pair<Integer,Integer>,Constituent>> |
alignClustering(String viewName,
edu.illinois.cs.cogcomp.thrift.base.Clustering corefClustering,
TextAnnotation ta)
Deprecated.
|
static Map<edu.illinois.cs.cogcomp.core.datastructures.Pair<Integer,Integer>,Constituent> |
alignSpans(String viewName,
List<edu.illinois.cs.cogcomp.thrift.base.Span> spans,
TextAnnotation ta,
boolean allowOverlappingSpans)
Deprecated.
|
static TokenLabelView |
alignTokenAnnotation(String viewName,
edu.illinois.cs.cogcomp.thrift.base.Labeling labeling,
TextAnnotation ta,
boolean alignAllTokens)
Deprecated.
|
static List<edu.illinois.cs.cogcomp.core.datastructures.Pair<Integer,Integer>> |
getCharacterOffsets(TextAnnotation ta,
List<Constituent> constituents)
Deprecated.
Get a list of character offsets for constituents.
|
public static SpanLabelView align(String viewName, edu.illinois.cs.cogcomp.thrift.base.Labeling labeling, TextAnnotation ta)
Labeling
to a SpanLabelView
for the input
TextAnnotation
. This function does not permit overlapping
spans and is useful for views such as NER, shallow parse, etc.
To allow overlapping spans, use TokenAligner#align(String,
Labeling, TextAnnotation, boolean)
, with the final parameter set to
true
.
viewName
- The name of the SpanLabelView
that is createdlabeling
- The Labeling
that needs to be convertedta
- The TextAnnotation
corresponding to the viewsSpanLabelView
for the input labeling, without
overlapping spanspublic static SpanLabelView align(String viewName, edu.illinois.cs.cogcomp.thrift.base.Labeling labeling, TextAnnotation ta, boolean allowOverlappingSpans)
public static Map<edu.illinois.cs.cogcomp.core.datastructures.Pair<Integer,Integer>,Constituent> alignSpans(String viewName, List<edu.illinois.cs.cogcomp.thrift.base.Span> spans, TextAnnotation ta, boolean allowOverlappingSpans)
public static TokenLabelView alignTokenAnnotation(String viewName, edu.illinois.cs.cogcomp.thrift.base.Labeling labeling, TextAnnotation ta, boolean alignAllTokens)
public static List<edu.illinois.cs.cogcomp.core.datastructures.Pair<Integer,Integer>> getCharacterOffsets(TextAnnotation ta, List<Constituent> constituents)
ta
- The TextAnnotation
, which contains the reference raw
textconstituents
- The constituents whose character offsets are requiredpublic static List<Map<edu.illinois.cs.cogcomp.core.datastructures.Pair<Integer,Integer>,Constituent>> alignClustering(String viewName, edu.illinois.cs.cogcomp.thrift.base.Clustering corefClustering, TextAnnotation ta)
Copyright © 2015. All rights reserved.