List of usage examples for edu.stanford.nlp.process CoreLabelTokenFactory CoreLabelTokenFactory
public CoreLabelTokenFactory(boolean addIndices)
From source file:com.panot.JavaCoref.MyMUCMentionExtractor.java
License:Open Source License
public MyMUCMentionExtractor(Dictionaries dict, Properties props, Semantics semantics) throws Exception { super(dict, semantics); String fileName = props.getProperty(Constants.MUC_PROP); fileContents = IOUtils.slurpFile(fileName); currentOffset = 0;/*from w w w. j a va 2 s . c o m*/ tokenizerFactory = PTBTokenizer.factory(new CoreLabelTokenFactory(false), "invertible"); stanfordProcessor = loadStanfordProcessor(props); if (props.containsKey(MyConstants.USE_GOLD_MENTION_PROP)) { useGoldMention = true; System.err.println("Using Gold Mention"); } else { useGoldMention = false; System.err.println("Not Using Gold Mention"); } if (props.containsKey(MyConstants.EXP_TYPE_PROP)) { experimentType = props.getProperty(MyConstants.EXP_TYPE_PROP); } else { experimentType = null; } tte_type = props.getProperty(MyConstants.TTE_TYPE); if (props.containsKey(MyConstants.TTE_TYPE) && tte_type.equals(MyConstants.TTE_TYPE_USE) && props.containsKey(MyConstants.TTE_MODEL)) { System.err.println("MUC Extract Use term"); use_term = true; System.err.println(tte_type); termAsMentionFinder = new TermAsMentionFinder(); } this.props = props; }
From source file:knu.univ.lingvo.coref.MUCMentionExtractor.java
License:Open Source License
public MUCMentionExtractor(Dictionaries dict, Properties props, Semantics semantics) throws Exception { super(dict, semantics); String fileName = props.getProperty(Constants.MUC_PROP); fileContents = IOUtils.slurpFile(fileName); currentOffset = 0;//from w w w . jav a 2s . c om tokenizerFactory = PTBTokenizer.factory(new CoreLabelTokenFactory(false), ""); stanfordProcessor = loadStanfordProcessor(props); }