Package edu.stanford.nlp.dcoref

Examples of edu.stanford.nlp.dcoref.Mention.spanToString()


      return false;
    }
    if(flags.USE_DIFFERENT_LOCATION
        && Rules.entityHaveDifferentLocation(mention, ant, dict)) {
      if(flags.USE_PROPERHEAD_AT_LAST  && ret && mention.goldCorefClusterID!=ant.goldCorefClusterID) {
        SieveCoreferenceSystem.logger.finest("DIFFERENT LOCATION: "+ant.spanToString()+" :: "+mention.spanToString());
      }
      return false;
    }
    if(flags.USE_NUMBER_IN_MENTION
        && Rules.entityNumberInLaterMention(mention, ant)) {
View Full Code Here


      return false;
    }
    if(flags.USE_NUMBER_IN_MENTION
        && Rules.entityNumberInLaterMention(mention, ant)) {
      if(flags.USE_PROPERHEAD_AT_LAST  && ret && mention.goldCorefClusterID!=ant.goldCorefClusterID) {
        SieveCoreferenceSystem.logger.finest("NEW NUMBER : "+ant.spanToString()+" :: "+mention.spanToString());
      }
      return false;
    }
    if(flags.USE_WN_HYPERNYM) {
      Method meth = semantics.wordnet.getClass().getMethod("checkHypernym", CorefCluster.class, CorefCluster.class, Mention.class, Mention.class);
View Full Code Here

      if((Boolean) meth.invoke(semantics.wordnet, mentionCluster, potentialAntecedent, mention, ant)) {
        ret = true;
      } else if (mention.goldCorefClusterID == ant.goldCorefClusterID
          && !mention.isPronominal() && !ant.isPronominal()){
        SieveCoreferenceSystem.logger.finest("not hypernym in WN");
        SieveCoreferenceSystem.logger.finest("False Negatives:: " + ant.spanToString() +" <= "+mention.spanToString());
      }
    }
    if(flags.USE_WN_SYNONYM) {
      Method meth = semantics.wordnet.getClass().getMethod("checkSynonym", new Class[]{Mention.class, Mention.class});
      if((Boolean) meth.invoke(semantics.wordnet, mention, ant)) {
View Full Code Here

      if((Boolean) meth.invoke(semantics.wordnet, mention, ant)) {
        ret = true;
      } else if (mention.goldCorefClusterID == ant.goldCorefClusterID
          && !mention.isPronominal() && !ant.isPronominal()){
        SieveCoreferenceSystem.logger.finest("not synonym in WN");
        SieveCoreferenceSystem.logger.finest("False Negatives:: " + ant.spanToString() +" <= "+mention.spanToString());
      }
    }

    try {
      if(flags.USE_ALIAS && Rules.entityAlias(mentionCluster, potentialAntecedent, semantics, dict)){
View Full Code Here

        } else if ( ! l.equals(sorted)) {
          SieveCoreferenceSystem.logger.finest("sorting succeeded & changed !! \tmentionID: "+m1.mentionID+" " + m1.spanToString());
          for (int i=0; i<l.size(); i++) {
            Mention ml = l.get(i);
            Mention msorted = sorted.get(i);
            SieveCoreferenceSystem.logger.finest("\t["+ml.spanToString()+"]\t["+msorted.spanToString()+"]");
          }
        } else {
          SieveCoreferenceSystem.logger.finest("no changed !! \tmentionID: "+m1.mentionID+" " + m1.spanToString());
        }
      }
View Full Code Here

    if (flags.USE_INCOMPATIBLES) {
      // Check our list of incompatible mentions and don't cluster them together
      // Allows definite no's from previous sieves to propagate down
      if (document.isIncompatible(mentionCluster, potentialAntecedent)) {
        SieveCoreferenceSystem.logger.finest("INCOMPATIBLE clusters: not match: " +ant.spanToString()+"("+ant.mentionID +
                ") :: "+ mention.spanToString()+"("+mention.mentionID + ") -> "+(mention.goldCorefClusterID!=ant.goldCorefClusterID));
        return false;
      }
    }
    if (flags.DO_PRONOUN && Math.abs(mention2.sentNum-ant.sentNum) > 3 &&
        mention2.person!=Person.I && mention2.person!=Person.YOU) {
View Full Code Here

      String mString = mention.lowercaseNormalizedSpanString();
      String antString = ant.lowercaseNormalizedSpanString();

      // mention and ant both belong to the same speaker cluster
      if (mention.speakerInfo != null && mention.speakerInfo == ant.speakerInfo) {
        SieveCoreferenceSystem.logger.finest("discourse match: maps to same speaker: " + mention.spanToString() + "\tmatched\t" + ant.spanToString());
        return true;
      }

      // (I - I) in the same speaker's quotation.
      if (mention.number==Number.SINGULAR && dict.firstPersonPronouns.contains(mString)
View Full Code Here

      // (I - I) in the same speaker's quotation.
      if (mention.number==Number.SINGULAR && dict.firstPersonPronouns.contains(mString)
          && ant.number==Number.SINGULAR && dict.firstPersonPronouns.contains(antString)
          && Rules.entitySameSpeaker(document, mention, ant)){
        SieveCoreferenceSystem.logger.finest("discourse match: 1st person same speaker: " + mention.spanToString() + "\tmatched\t" + ant.spanToString());
        return true;
      }
      // (speaker - I)
      if ((mention.number==Number.SINGULAR && dict.firstPersonPronouns.contains(mString))
              && Rules.antecedentIsMentionSpeaker(document, mention, ant, dict)) {
View Full Code Here

        return true;
      }
      // (speaker - I)
      if ((mention.number==Number.SINGULAR && dict.firstPersonPronouns.contains(mString))
              && Rules.antecedentIsMentionSpeaker(document, mention, ant, dict)) {
        SieveCoreferenceSystem.logger.finest("discourse match: 1st person mention speaker match antecedent: " + mention.spanToString() + "\tmatched\t" + ant.spanToString());
        if (mention.speakerInfo == null && ant.speakerInfo != null) { mention.speakerInfo = ant.speakerInfo; }
        return true;
      }
      // (I - speaker)
      if ((ant.number==Number.SINGULAR && dict.firstPersonPronouns.contains(antString))
View Full Code Here

        return true;
      }
      // (I - speaker)
      if ((ant.number==Number.SINGULAR && dict.firstPersonPronouns.contains(antString))
              && Rules.antecedentIsMentionSpeaker(document, ant, mention, dict)) {
        SieveCoreferenceSystem.logger.finest("discourse match: 1st person antecedent speaker match mention: " + mention.spanToString() + "\tmatched\t" + ant.spanToString());
        if (ant.speakerInfo == null && mention.speakerInfo != null) { ant.speakerInfo = mention.speakerInfo; }
        return true;
      }
      // Can be iffy if more than two speakers... but still should be okay most of the time
      if (dict.secondPersonPronouns.contains(mString)
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.