Package edu.stanford.nlp.sempre.fbalignment.lexicons.normalizers

Examples of edu.stanford.nlp.sempre.fbalignment.lexicons.normalizers.PrepDropNormalizer


public class PrepDropNormalizerTest {
 
  @Test
  public void normalization() {
    PrepDropNormalizer normalizer = new PrepDropNormalizer();
    assertEquals("interested",normalizer.normalize("interested in"));
    assertEquals("interested", normalizer.normalize("interested at"));
    assertEquals("blow up",normalizer.normalize("blow up in"));
    assertEquals("blow up the",normalizer.normalize("blow up the to"));
  }
View Full Code Here


    fbFormulasInfo = FbFormulasInfo.getSingleton();

    //if we omit prepositions then the lexicon normalizer does that, otherwise, it is a normalizer that does nothing
    if (opts.prepDropNormalization) {
      lexiconLoadingNormalizer = new PrepDropNormalizer(); // the alignment lexicon already contains stemmed stuff so just need to drop prepositions
    } else {
      lexiconLoadingNormalizer = new IdentityNormalizer();
    }

    for (String lexiconFile : opts.binaryLexiconFilesPath) {
View Full Code Here

TOP

Related Classes of edu.stanford.nlp.sempre.fbalignment.lexicons.normalizers.PrepDropNormalizer

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.