Package com.clearnlp.morphology.english

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


    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

  }
 
  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

Related Classes of com.clearnlp.morphology.english.EnglishAffixMatcherFactory

Copyright © 2018 www.massapicom. 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.