예제 #1
0
  /**
   * compare two lexical chains
   *
   * @param otherLexicalChain
   * @param similarityMeasure
   * @return
   */
  public Double compare(
      LexicalChain otherLexicalChain, SimilarityMeasures<String> similarityMeasure) {

    return similarityMeasure.measureSetSetSimilarity(
        getLexicalChain(), otherLexicalChain.getLexicalChain());
    // return (setSimilarityMeasures.containmentSimilarity(getLexicalChain(),
    // otherLexicalChain.getLexicalChain()) +
    // setSimilarityMeasures.containmentSimilarity(otherLexicalChain.getLexicalChain(),getLexicalChain()))/2 ;
  }
예제 #2
0
 public void addLexicalChain(LexicalChain lexicalChain) {
   getLexicalChain().addAll(lexicalChain.getLexicalChain());
 }
예제 #3
0
 public LexicalChain(LexicalChain lexicalChain) {
   super();
   this.lexicalChains = new HashSet<String>(lexicalChain.getLexicalChain());
   setThreshold(DEFAULT_THRESHOLD);
 }