public class CorefClusterAdv extends Object
| Modifier and Type | Class and Description |
|---|---|
class |
CorefClusterAdv.EdgeComparator |
class |
CorefClusterAdv.PseudoEdge |
class |
CorefClusterAdv.PseudoEdgeComparator |
class |
CorefClusterAdv.PseudoVertex |
| Constructor and Description |
|---|
CorefClusterAdv() |
CorefClusterAdv(double threshold) |
CorefClusterAdv(double threshold,
Matrix2 sgdParameters,
int numSGDFeatures) |
CorefClusterAdv(double threshold,
MaxEnt classifier,
Pipe p) |
CorefClusterAdv(double threshold,
MaxEnt classifier,
TreeModel tm,
Pipe p) |
CorefClusterAdv(Pipe p) |
CorefClusterAdv(Pipe p,
TreeModel tm) |
CorefClusterAdv(TreeModel tm) |
| Modifier and Type | Method and Description |
|---|---|
Collection |
absoluteCluster(InstanceList ilist,
List mentions) |
void |
addVerticesToGraph(salvo.jesus.graph.WeightedGraph graph,
List mentions,
HashMap alreadyAddedVertices) |
protected salvo.jesus.graph.WeightedGraph |
buildGraphFromPseudoEdges(List pedges,
List mentions) |
salvo.jesus.graph.WeightedEdge |
chooseEdge2(List edges,
double minVal,
double total,
Random rand) |
salvo.jesus.graph.WeightedEdge |
chooseEdge3(List edges,
double minVal,
double total,
Random rand) |
Collection |
clusterMentions(InstanceList ilist,
List mentions) |
Collection |
clusterMentions(InstanceList ilist,
List mentions,
int optimalNBest,
boolean stochastic) |
protected double |
collectionAvg(Collection collection) |
void |
completeGraphNBest(salvo.jesus.graph.WeightedGraph graph,
Collection keyPartitioning,
Map citMap) |
double |
computeInitialTreeObjScore(Collection pvertices) |
protected void |
constructEdgesFromPseudoEdges(salvo.jesus.graph.WeightedGraph graph,
CorefClusterAdv.PseudoEdge pedge,
HashMap alreadyAdded) |
void |
constructEdgesUsingTrainedClusterer(salvo.jesus.graph.WeightedGraph graph,
Instance instPair,
HashMap alreadyAdded) |
void |
constructEdgesUsingTrainedClusterer(salvo.jesus.graph.WeightedGraph graph,
Instance instPair,
HashMap alreadyAdded,
Double edgeWeight) |
void |
constructEdgesUsingTrainedClusterer(salvo.jesus.graph.WeightedGraph graph,
Instance instPair,
HashMap alreadyAdded,
Double edgeWeight,
MaxEnt classifier) |
salvo.jesus.graph.WeightedGraph |
constructOptimalEdgesUsingNBest(List mentions,
int N) |
salvo.jesus.graph.WeightedGraph |
copyGraph(salvo.jesus.graph.WeightedGraph graph) |
salvo.jesus.graph.WeightedGraph |
createGraph(InstanceList ilist,
List mentions) |
salvo.jesus.graph.WeightedGraph |
createGraph(InstanceList ilist,
List mentions,
salvo.jesus.graph.WeightedGraph graph) |
salvo.jesus.graph.WeightedGraph |
createGraph(InstanceList ilist,
List mentions,
salvo.jesus.graph.WeightedGraph graph,
MaxEnt classifier) |
List |
createPseudoEdges(InstanceList instances,
Map map) |
Collection |
createPseudoVertices(InstanceList instances,
List mentions,
HashMap map) |
double |
evaluateAgainstKey(Collection col) |
double |
evaluatePartitioning(Collection clustering,
salvo.jesus.graph.WeightedGraph graph) |
double |
evaluatePartitioningExternal(InstanceList ilist,
List mentions,
Collection collection) |
double |
evaluatePartitioningExternal(InstanceList ilist,
List mentions,
Collection collection,
int nBestList) |
void |
exportGraph(String file) |
MaxEnt |
getClassifier() |
protected Collection |
getClusteringFromPseudo(Collection pvertices) |
Collection |
getCollectionOfOriginalObjects(Collection vertices)
Construct a Collection of Collections where the objects in the
collections are the original objects (i.e.
|
protected Collection |
getPseudoClustering(Collection pvertices) |
void |
getUnNormalizedScores(Matrix2 lambdas,
FeatureVector fv,
double[] scores) |
protected boolean |
hasNextIndexList(int[] indexList,
int N) |
boolean |
inSameCluster(Collection clustering,
Object o1,
Object o2) |
void |
loadME(String file) |
void |
mergeVertices(salvo.jesus.graph.WeightedGraph g,
salvo.jesus.graph.VertexImpl v1,
salvo.jesus.graph.VertexImpl v2) |
protected int[] |
nextIndexList(int[] indexList,
int N) |
protected int[] |
nextIndexListStochastic(int[] indexList,
int N) |
protected int |
numSingletons(Collection clustering) |
Collection |
partitionGraph(salvo.jesus.graph.WeightedGraph origGraph) |
void |
printGraph(salvo.jesus.graph.WeightedGraph g) |
String |
printParamDetails(FeatureVector vec,
Classification classification,
MaxEnt classifier) |
void |
printParams(MaxEnt me) |
void |
setConfWeightedScores(boolean b) |
void |
setFullPartition(boolean f) |
void |
setKeyPartitioning(Collection keyP) |
void |
setNBestInference(boolean b) |
void |
setOptimality(boolean b) |
void |
setRBeamSize(int s) |
void |
setSearchParams(int iters,
int reductions) |
void |
setThreshold(double t) |
void |
setTrueNumStop(boolean b) |
void |
testClassifier(InstanceList tlist) |
void |
testClassifier(InstanceList tlist,
MaxEnt classifier) |
void |
train(InstanceList ilist) |
MaxEnt |
trainClassifier(InstanceList ilist) |
Collection |
typicalClusterAdv(InstanceList ilist,
List mentions) |
Collection |
typicalClusterPartition(salvo.jesus.graph.WeightedGraph graph) |
void |
updateGraphNBest(salvo.jesus.graph.WeightedGraph graph,
int[] indexList,
List instList,
HashMap alreadyAdded) |
double |
updateScore(double curScore,
double[] treeScore,
CorefClusterAdv.PseudoVertex v1,
CorefClusterAdv.PseudoVertex v2,
Set s1,
Set s2,
boolean over_ride) |
double |
weightOfConfig(int[] indexList,
List instList) |
public CorefClusterAdv()
public CorefClusterAdv(TreeModel tm)
public CorefClusterAdv(Pipe p)
public CorefClusterAdv(double threshold)
public CorefClusterAdv(double threshold,
Matrix2 sgdParameters,
int numSGDFeatures)
public void setConfWeightedScores(boolean b)
public void setRBeamSize(int s)
public void setOptimality(boolean b)
public void setNBestInference(boolean b)
public void setTrueNumStop(boolean b)
public void setSearchParams(int iters,
int reductions)
public void setThreshold(double t)
public void setKeyPartitioning(Collection keyP)
public void setFullPartition(boolean f)
public void loadME(String file)
public void train(InstanceList ilist)
public MaxEnt trainClassifier(InstanceList ilist)
public void testClassifier(InstanceList tlist)
public void testClassifier(InstanceList tlist, MaxEnt classifier)
public String printParamDetails(FeatureVector vec, Classification classification, MaxEnt classifier)
public void printParams(MaxEnt me)
public MaxEnt getClassifier()
public Collection clusterMentions(InstanceList ilist, List mentions)
public Collection clusterMentions(InstanceList ilist, List mentions, int optimalNBest, boolean stochastic)
public salvo.jesus.graph.WeightedGraph createGraph(InstanceList ilist, List mentions)
public salvo.jesus.graph.WeightedGraph createGraph(InstanceList ilist, List mentions, salvo.jesus.graph.WeightedGraph graph)
public salvo.jesus.graph.WeightedGraph createGraph(InstanceList ilist, List mentions, salvo.jesus.graph.WeightedGraph graph, MaxEnt classifier)
public void exportGraph(String file)
public salvo.jesus.graph.WeightedGraph copyGraph(salvo.jesus.graph.WeightedGraph graph)
public void addVerticesToGraph(salvo.jesus.graph.WeightedGraph graph,
List mentions,
HashMap alreadyAddedVertices)
public salvo.jesus.graph.WeightedEdge chooseEdge3(List edges, double minVal, double total, Random rand)
public salvo.jesus.graph.WeightedEdge chooseEdge2(List edges, double minVal, double total, Random rand)
public double evaluatePartitioningExternal(InstanceList ilist, List mentions, Collection collection)
public double evaluatePartitioningExternal(InstanceList ilist, List mentions, Collection collection, int nBestList)
public double evaluatePartitioning(Collection clustering, salvo.jesus.graph.WeightedGraph graph)
public boolean inSameCluster(Collection clustering, Object o1, Object o2)
public List createPseudoEdges(InstanceList instances, Map map)
public Collection createPseudoVertices(InstanceList instances, List mentions, HashMap map)
public double updateScore(double curScore,
double[] treeScore,
CorefClusterAdv.PseudoVertex v1,
CorefClusterAdv.PseudoVertex v2,
Set s1,
Set s2,
boolean over_ride)
public double computeInitialTreeObjScore(Collection pvertices)
public Collection absoluteCluster(InstanceList ilist, List mentions)
protected Collection getPseudoClustering(Collection pvertices)
public Collection typicalClusterAdv(InstanceList ilist, List mentions)
protected int numSingletons(Collection clustering)
protected Collection getClusteringFromPseudo(Collection pvertices)
protected salvo.jesus.graph.WeightedGraph buildGraphFromPseudoEdges(List pedges, List mentions)
public Collection typicalClusterPartition(salvo.jesus.graph.WeightedGraph graph)
public Collection partitionGraph(salvo.jesus.graph.WeightedGraph origGraph)
public double evaluateAgainstKey(Collection col)
public Collection getCollectionOfOriginalObjects(Collection vertices)
public void mergeVertices(salvo.jesus.graph.WeightedGraph g,
salvo.jesus.graph.VertexImpl v1,
salvo.jesus.graph.VertexImpl v2)
public void printGraph(salvo.jesus.graph.WeightedGraph g)
protected double collectionAvg(Collection collection)
protected boolean hasNextIndexList(int[] indexList,
int N)
protected int[] nextIndexList(int[] indexList,
int N)
protected int[] nextIndexListStochastic(int[] indexList,
int N)
public double weightOfConfig(int[] indexList,
List instList)
public void updateGraphNBest(salvo.jesus.graph.WeightedGraph graph,
int[] indexList,
List instList,
HashMap alreadyAdded)
public salvo.jesus.graph.WeightedGraph constructOptimalEdgesUsingNBest(List mentions, int N)
public void completeGraphNBest(salvo.jesus.graph.WeightedGraph graph,
Collection keyPartitioning,
Map citMap)
protected void constructEdgesFromPseudoEdges(salvo.jesus.graph.WeightedGraph graph,
CorefClusterAdv.PseudoEdge pedge,
HashMap alreadyAdded)
public void constructEdgesUsingTrainedClusterer(salvo.jesus.graph.WeightedGraph graph,
Instance instPair,
HashMap alreadyAdded)
public void constructEdgesUsingTrainedClusterer(salvo.jesus.graph.WeightedGraph graph,
Instance instPair,
HashMap alreadyAdded,
Double edgeWeight)
public void constructEdgesUsingTrainedClusterer(salvo.jesus.graph.WeightedGraph graph,
Instance instPair,
HashMap alreadyAdded,
Double edgeWeight,
MaxEnt classifier)
public void getUnNormalizedScores(Matrix2 lambdas, FeatureVector fv, double[] scores)
Copyright © 2019 JULIE Lab, Germany. All rights reserved.