public class FastNeuralCorefModel
extends java.lang.Object
implements java.io.Serializable
Constructor and Description |
---|
FastNeuralCorefModel(EmbeddingExtractor embeddingExtractor,
java.util.Map<java.lang.String,java.lang.Integer> pairFeatureIds,
java.util.Map<java.lang.String,java.lang.Integer> mentionFeatureIds,
java.util.List<org.ejml.simple.SimpleMatrix> weights) |
Modifier and Type | Method and Description |
---|---|
java.util.List<org.ejml.simple.SimpleMatrix> |
getAllWeights() |
EmbeddingExtractor |
getEmbeddingExtractor() |
java.util.Map<java.lang.String,java.lang.Integer> |
getMentionFeatureIds() |
java.util.Map<java.lang.String,java.lang.Integer> |
getPairFeatureIds() |
static FastNeuralCorefModel |
loadFromTextFiles(java.lang.String path) |
static java.util.Map<java.lang.String,java.lang.Integer> |
loadMapFromTextFile(java.lang.String filename) |
double |
score(Mention antecedent,
Mention anaphor,
Counter<java.lang.String> antecedentFeatures,
Counter<java.lang.String> anaphorFeatures,
Counter<java.lang.String> pairFeatures,
java.util.Map<java.lang.Integer,org.ejml.simple.SimpleMatrix> antecedentCache,
java.util.Map<java.lang.Integer,org.ejml.simple.SimpleMatrix> anaphorCache) |
public FastNeuralCorefModel(EmbeddingExtractor embeddingExtractor, java.util.Map<java.lang.String,java.lang.Integer> pairFeatureIds, java.util.Map<java.lang.String,java.lang.Integer> mentionFeatureIds, java.util.List<org.ejml.simple.SimpleMatrix> weights)
public EmbeddingExtractor getEmbeddingExtractor()
public java.util.Map<java.lang.String,java.lang.Integer> getPairFeatureIds()
public java.util.Map<java.lang.String,java.lang.Integer> getMentionFeatureIds()
public java.util.List<org.ejml.simple.SimpleMatrix> getAllWeights()
public double score(Mention antecedent, Mention anaphor, Counter<java.lang.String> antecedentFeatures, Counter<java.lang.String> anaphorFeatures, Counter<java.lang.String> pairFeatures, java.util.Map<java.lang.Integer,org.ejml.simple.SimpleMatrix> antecedentCache, java.util.Map<java.lang.Integer,org.ejml.simple.SimpleMatrix> anaphorCache)
public static FastNeuralCorefModel loadFromTextFiles(java.lang.String path)
public static java.util.Map<java.lang.String,java.lang.Integer> loadMapFromTextFile(java.lang.String filename)