Package grammar.model

Examples of grammar.model.MatchType


    else if (qName.equals("mood")) {
      enableParsing(ParseMode.MOOD);
    }
    else if (infinitiveContext || auxiliaryOfContext) {
      try {
        MatchType mt = MatchType.valueOf(qName.toUpperCase().replace('-', '_'));
        enableParsing(ParseMode.MATCH_TYPE);
        if (infinitiveContext)
          matchType = mt;
        else // auxiliaryOfContext
          auxiliaryMatchType = mt;
View Full Code Here


    //System.err.println("ModelVerb.getInfinitiveMatcher(S,b):"+new Date());

//    System.out.println("ModelVerb.getInfinitiveMatcher(): "+infinitive);

    for (WordMatcher im : infinitiveMatchers) {
      MatchType matchType = im.getMatchType();
      switch (matchType) {
      case FULL_NAME:
        if (infinitive.equalsIgnoreCase(im.getMatchString()))
          return im;
        break;
View Full Code Here

    }
  }
 
  public WordMatcher getNounMatcher(String noun) {
    for (WordMatcher nm : nounMatchers) {
      MatchType matchType = nm.getMatchType();
      switch (matchType) {
      case FULL_NAME:
        if (noun.equalsIgnoreCase(nm.getMatchString()))
          return nm;
        break;
View Full Code Here

    if (reflexive && isReflexiveAuxiliary())
      return MatchType.REFLEXIVE;

    for (WordMatcher inf : auxiliaryOf) {
      MatchType matchType = inf.getMatchType();
      MatchType match = null;
      switch (matchType) {
      case ALL:
        match = MatchType.ALL;
        break;
      case NONE:
View Full Code Here

  private String getAuxiliaryMatchString(String infinitive) {
    //System.err.println("AuxiliaryVerb.getAuxiliaryMatchString():"+new Date());

    for (WordMatcher inf : auxiliaryOf) {
      MatchType matchType = inf.getMatchType();
      boolean match = false;
      switch (matchType) {
      case FULL_NAME:
        if (infinitive.equals(inf.getMatchString()))
          match = true;
View Full Code Here

  }

  public boolean isCloserMatch(String infinitive, boolean reflexive, AuxiliaryVerb other) {
    //System.err.println("AuxiliaryVerb.isCloserMatch():"+new Date());

    MatchType thisMt = isAuxiliaryOfInternal(infinitive, reflexive);
    MatchType otherMt = other.isAuxiliaryOfInternal(infinitive, reflexive);

    /*if (isReflexiveAuxiliary()) {
      System.out.println("SQUoooo");
      if (reflexive) {
        System.out.println("squOo2");
        return true;
      }
    }*/

    if (thisMt == MatchType.SUFFIX && otherMt == MatchType.SUFFIX) {
      return getAuxiliaryMatchString(infinitive).length() >
        other.getAuxiliaryMatchString(infinitive).length();
    }
    if (thisMt.ordinal() > otherMt.ordinal())
      return true;
    return false;
  }
View Full Code Here

TOP

Related Classes of grammar.model.MatchType

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.