Class FastNeuralCorefModel
- java.lang.Object
-
- edu.stanford.nlp.coref.fastneural.FastNeuralCorefModel
-
- All Implemented Interfaces:
Serializable
public class FastNeuralCorefModel extends Object implements Serializable
Featurizes and scores mention pairs using a neural network.- Author:
- kevinclark
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description FastNeuralCorefModel(EmbeddingExtractor embeddingExtractor, Map<String,Integer> pairFeatureIds, Map<String,Integer> mentionFeatureIds, List<org.ejml.simple.SimpleMatrix> weights)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description List<org.ejml.simple.SimpleMatrix>getAllWeights()EmbeddingExtractorgetEmbeddingExtractor()Map<String,Integer>getMentionFeatureIds()Map<String,Integer>getPairFeatureIds()static FastNeuralCorefModelloadFromTextFiles(String path)static Map<String,Integer>loadMapFromTextFile(String filename)doublescore(Mention antecedent, Mention anaphor, Counter<String> antecedentFeatures, Counter<String> anaphorFeatures, Counter<String> pairFeatures, Map<Integer,org.ejml.simple.SimpleMatrix> antecedentCache, Map<Integer,org.ejml.simple.SimpleMatrix> anaphorCache)
-
-
-
Method Detail
-
getEmbeddingExtractor
public EmbeddingExtractor getEmbeddingExtractor()
-
getAllWeights
public List<org.ejml.simple.SimpleMatrix> getAllWeights()
-
score
public double score(Mention antecedent, Mention anaphor, Counter<String> antecedentFeatures, Counter<String> anaphorFeatures, Counter<String> pairFeatures, Map<Integer,org.ejml.simple.SimpleMatrix> antecedentCache, Map<Integer,org.ejml.simple.SimpleMatrix> anaphorCache)
-
loadFromTextFiles
public static FastNeuralCorefModel loadFromTextFiles(String path)
-
-