Examples of EnglishAffixMatcherFactory


Examples of com.clearnlp.morphology.english.EnglishAffixMatcherFactory

    Element     eAffixes        = UTXml.getFirstElementByTagName(eInflection, type);
    InputStream baseStream      = UTInput.getInputStreamsFromClasspath(PATH + type + EXT_BASE);
    InputStream exceptionStream = UTInput.getInputStreamsFromClasspath(PATH + type + EXT_EXCEPTION);
   
    Map<String,String> exceptionMap = (exceptionStream != null) ? UTInput.getStringMap(exceptionStream, PTLib.SPACE) : null;
    List<AbstractAffixMatcher> affixMatchers = new EnglishAffixMatcherFactory().createAffixMatchers(eAffixes);
    Set<String> baseSet = UTInput.getStringSet(baseStream);
   
    return new EnglishInflection(basePOS, baseSet, exceptionMap, affixMatchers);
  }
View Full Code Here

Examples of com.clearnlp.morphology.english.EnglishAffixMatcherFactory

    Element     eAffixes        = UTXml.getFirstElementByTagName(eInflection, type);
    InputStream baseStream      = file.getInputStream(new ZipEntry(PATH + type + EXT_BASE));
    InputStream exceptionStream = file.getInputStream(new ZipEntry(PATH + type + EXT_EXCEPTION));
   
    Map<String,String> exceptionMap = (exceptionStream != null) ? UTInput.getStringMap(exceptionStream, PTLib.SPACE) : null;
    List<AbstractAffixMatcher> affixMatchers = new EnglishAffixMatcherFactory().createAffixMatchers(eAffixes);
    Set<String> baseSet = UTInput.getStringSet(baseStream);
   
    return new EnglishInflection(basePOS, baseSet, exceptionMap, affixMatchers);
  }
View Full Code Here

Examples of com.clearnlp.morphology.english.EnglishAffixMatcherFactory

  }
 
  private EnglishInflection getInflection(InputStream baseStream, InputStream exceptionStream, Element eAffixes, String basePOS) throws IOException
  {
    Map<String,String> exceptionMap = (exceptionStream != null) ? UTInput.getStringMap(exceptionStream, PTLib.SPACE) : null;
    List<AbstractAffixMatcher> affixMatchers = new EnglishAffixMatcherFactory().createAffixMatchers(eAffixes);
    Set<String> baseSet = UTInput.getStringSet(baseStream);
   
    return new EnglishInflection(basePOS, baseSet, exceptionMap, affixMatchers);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.