public class CuratorDataStructureInterface extends Object
Constructor and Description |
---|
CuratorDataStructureInterface() |
Modifier and Type | Method and Description |
---|---|
static CoreferenceView |
alignClusteringToCoreferenceView(String viewName,
TextAnnotation ta,
edu.illinois.cs.cogcomp.thrift.base.Clustering clustering)
|
static TreeView |
alignForestToDependencyView(String viewName,
TextAnnotation ta,
edu.illinois.cs.cogcomp.thrift.base.Forest dep) |
static TreeView |
alignForestToParseTreeView(String viewName,
TextAnnotation ta,
edu.illinois.cs.cogcomp.thrift.base.Forest parseForest)
note that the trees in the Forest argument need not be actual parse trees (they can e.g.
|
static PredicateArgumentView |
alignForestToPredicateArgumentView(String viewName,
TextAnnotation ta,
edu.illinois.cs.cogcomp.thrift.base.Forest forest) |
static SpanLabelView |
alignLabelingToSpanLabelView(String viewName,
TextAnnotation ta,
edu.illinois.cs.cogcomp.thrift.base.Labeling spanLabeling,
boolean allowOverlappingSpans)
Aligns a
Labeling to a
SpanLabelView . |
static TokenLabelView |
alignLabelingToTokenLabelView(String viewName,
TextAnnotation ta,
edu.illinois.cs.cogcomp.thrift.base.Labeling labeling)
Aligns a
Labeling to a
TokenLabelView . |
protected static void |
copyAttributesToConstituent(edu.illinois.cs.cogcomp.thrift.base.Span span,
Constituent newConstituent) |
protected static Constituent |
getNewConstituentForSpan(String label,
String viewName,
TextAnnotation ta,
edu.illinois.cs.cogcomp.thrift.base.Span span) |
protected static Tree<String> |
getParseTree(String sentenceRawString,
edu.illinois.cs.cogcomp.thrift.base.Tree tree) |
protected static Pair<Tree<String>,Tree<Double>> |
getParseTreeScores(String sentenceRawString,
edu.illinois.cs.cogcomp.thrift.base.Tree tree) |
static TextAnnotation |
getTextAnnotationFromRecord(String corpusId,
String textId,
edu.illinois.cs.cogcomp.thrift.curator.Record record,
edu.illinois.cs.cogcomp.thrift.base.Labeling tokensLabeling,
edu.illinois.cs.cogcomp.thrift.base.Labeling sentenceLabeling) |
protected static Tree<Pair<String,Integer>> |
makeDependencyTree(TextAnnotation ta,
edu.illinois.cs.cogcomp.thrift.base.Tree tree)
Converts a curator tree into a dependency tree that can be added to a TreeView.
|
public static TextAnnotation getTextAnnotationFromRecord(String corpusId, String textId, edu.illinois.cs.cogcomp.thrift.curator.Record record, edu.illinois.cs.cogcomp.thrift.base.Labeling tokensLabeling, edu.illinois.cs.cogcomp.thrift.base.Labeling sentenceLabeling)
public static TreeView alignForestToParseTreeView(String viewName, TextAnnotation ta, edu.illinois.cs.cogcomp.thrift.base.Forest parseForest)
viewName
- ta
- parseForest
- protected static Pair<Tree<String>,Tree<Double>> getParseTreeScores(String sentenceRawString, edu.illinois.cs.cogcomp.thrift.base.Tree tree)
protected static Tree<String> getParseTree(String sentenceRawString, edu.illinois.cs.cogcomp.thrift.base.Tree tree)
public static PredicateArgumentView alignForestToPredicateArgumentView(String viewName, TextAnnotation ta, edu.illinois.cs.cogcomp.thrift.base.Forest forest)
public static CoreferenceView alignClusteringToCoreferenceView(String viewName, TextAnnotation ta, edu.illinois.cs.cogcomp.thrift.base.Clustering clustering)
Clustering
to a
TextAnnotation
to produce
a CoreferenceView
. Note:
This function assumes that the longest mention (in terms of the number of characters) is the
canonical mention.public static SpanLabelView alignLabelingToSpanLabelView(String viewName, TextAnnotation ta, edu.illinois.cs.cogcomp.thrift.base.Labeling spanLabeling, boolean allowOverlappingSpans)
Labeling
to a
SpanLabelView
.public static TokenLabelView alignLabelingToTokenLabelView(String viewName, TextAnnotation ta, edu.illinois.cs.cogcomp.thrift.base.Labeling labeling)
Labeling
to a
TokenLabelView
.
NOTE: must correct for one-past-the-end labeling when calling
TextAnnotation.getTokenIdFromCharacterOffset(int)
.public static TreeView alignForestToDependencyView(String viewName, TextAnnotation ta, edu.illinois.cs.cogcomp.thrift.base.Forest dep)
protected static Tree<Pair<String,Integer>> makeDependencyTree(TextAnnotation ta, edu.illinois.cs.cogcomp.thrift.base.Tree tree)
protected static Constituent getNewConstituentForSpan(String label, String viewName, TextAnnotation ta, edu.illinois.cs.cogcomp.thrift.base.Span span)
protected static void copyAttributesToConstituent(edu.illinois.cs.cogcomp.thrift.base.Span span, Constituent newConstituent)
Copyright © 2017. All rights reserved.