Examples of occurrences()


Examples of net.yacy.kelondro.data.word.Word.occurrences()

        // check if the token appears in the text
        if (words.containsKey(token)) {
          final Word word = words.get(token);
          // token appears in text and matches an existing bookmark tag
          if (tags.containsKey(token)) {
            count = word.occurrences() * tags.get(token).size() * 100;
          }
          // token appears in text and has more than 3 characters
          if (token.length()>3) {
            count = word.occurrences() * 100;
          }
 
View Full Code Here

Examples of net.yacy.kelondro.data.word.Word.occurrences()

          if (tags.containsKey(token)) {
            count = word.occurrences() * tags.get(token).size() * 100;
          }
          // token appears in text and has more than 3 characters
          if (token.length()>3) {
            count = word.occurrences() * 100;
          }
          topwords.add(new YMarkTag(token, count));
        }
      }
      count = 0;
View Full Code Here

Examples of net.yacy.kelondro.data.word.Word.occurrences()

 
  public int compare(final String k1, final String k2) {
    final Word w1 = this.words.get(k1);
    final Word w2 = this.words.get(k2);
   
        if(w1.occurrences() > w2.occurrences())
            return 1;
        else if(w1.occurrences() < w2.occurrences())
            return -1;
        else
            return 0;
View Full Code Here

Examples of net.yacy.kelondro.data.word.Word.occurrences()

    final Word w1 = this.words.get(k1);
    final Word w2 = this.words.get(k2);
   
        if(w1.occurrences() > w2.occurrences())
            return 1;
        else if(w1.occurrences() < w2.occurrences())
            return -1;
        else
            return 0;
  }
}
View Full Code Here

Examples of net.yacy.kelondro.data.word.Word.occurrences()

        // check if the token appears in the text
        if (words.containsKey(token.toString())) {         
          final Word word = words.get(token.toString());
          // token appears in text and matches an existing bookmark tag
          if (tags.containsKey(token.toString())) {
            score = word.occurrences() * tags.get(token.toString()).size() * 200;
          }
          // token appears in text and has more than 3 characters
          else if (token.length()>3) {
            score = word.occurrences() * 100;
          }
 
View Full Code Here

Examples of net.yacy.kelondro.data.word.Word.occurrences()

          if (tags.containsKey(token.toString())) {
            score = word.occurrences() * tags.get(token.toString()).size() * 200;
          }
          // token appears in text and has more than 3 characters
          else if (token.length()>3) {
            score = word.occurrences() * 100;
          }
          // if token is already part of a phrase, reduce score
          if(pwords.toString().indexOf(token.toString())>1) {
            score = score / 3;
          }
View Full Code Here

Examples of org.opensolaris.opengrok.analysis.Definitions.occurrences()

                Document doc = searcher.doc(hits[0].doc);
                if (doc.getField(QueryBuilder.TAGS) != null) {
                    byte[] rawTags = doc.getField(QueryBuilder.TAGS).binaryValue().bytes;
                    Definitions tags = Definitions.deserialize(rawTags);
                    String symbol = ((TermQuery) query).getTerm().text();
                    if (tags.occurrences(symbol) == 1) {
                        uniqueDefinition = true;
                    }
                }
            }
            // @TODO fix me. I should try to figure out where the exact hit is
View Full Code Here

Examples of org.watermint.sourcecolon.org.opensolaris.opengrok.analysis.Definitions.occurrences()

                Document doc = searcher.doc(hits[0].doc);
                if (doc.getFieldable("tags") != null) {
                    byte[] rawTags = doc.getFieldable("tags").getBinaryValue();
                    Definitions tags = Definitions.deserialize(rawTags);
                    String symbol = ((TermQuery) query).getTerm().text();
                    if (tags.occurrences(symbol) == 1) {
                        uniqueDefinition = true;
                    }
                }
            }
            // @TODO fix me. I should try to figure out where the exact hit is
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.