git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@2150 6c8d7289-2bf4-0310-a012-ef5d649a1542pull/1/head
parent
7b3b12888c
commit
5041d330ce
@ -1,220 +1,203 @@
|
|||||||
// plasmaIndexEntry.java
|
// indexURLEntry.java
|
||||||
// -----------------------
|
// (C) 2004, 2005, 2006 by Michael Peter Christen; mc@anomic.de, Frankfurt a. M., Germany
|
||||||
// part of YaCy
|
// first published 2004 on http://www.anomic.de
|
||||||
// (C) by Michael Peter Christen; mc@anomic.de
|
//
|
||||||
// first published on http://www.anomic.de
|
// This is a part of YaCy, a peer-to-peer based web search engine
|
||||||
// Frankfurt, Germany, 2004
|
//
|
||||||
//
|
// $LastChangedDate: 2006-04-02 22:40:07 +0200 (So, 02 Apr 2006) $
|
||||||
// $LastChangedDate$
|
// $LastChangedRevision: 1986 $
|
||||||
// $LastChangedRevision$
|
// $LastChangedBy: orbiter $
|
||||||
// $LastChangedBy$
|
//
|
||||||
//
|
// LICENSE
|
||||||
// This program is free software; you can redistribute it and/or modify
|
//
|
||||||
// it under the terms of the GNU General Public License as published by
|
// This program is free software; you can redistribute it and/or modify
|
||||||
// the Free Software Foundation; either version 2 of the License, or
|
// it under the terms of the GNU General Public License as published by
|
||||||
// (at your option) any later version.
|
// the Free Software Foundation; either version 2 of the License, or
|
||||||
//
|
// (at your option) any later version.
|
||||||
// This program is distributed in the hope that it will be useful,
|
//
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// This program is distributed in the hope that it will be useful,
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// GNU General Public License for more details.
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
//
|
// GNU General Public License for more details.
|
||||||
// You should have received a copy of the GNU General Public License
|
//
|
||||||
// along with this program; if not, write to the Free Software
|
// You should have received a copy of the GNU General Public License
|
||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// along with this program; if not, write to the Free Software
|
||||||
//
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
// Using this software in any meaning (reading, learning, copying, compiling,
|
|
||||||
// running) means that you agree that the Author(s) is (are) not responsible
|
/*
|
||||||
// for cost, loss of data or any harm that may be caused directly or indirectly
|
This class defines the structures of an index entry for URLs
|
||||||
// by usage of this softare or this documentation. The usage of this software
|
*/
|
||||||
// is on your own risk. The installation and usage (starting/running) of this
|
|
||||||
// software may allow other people or application to access your computer and
|
package de.anomic.index;
|
||||||
// any attached devices and is highly dependent on the configuration of the
|
|
||||||
// software which must be done by the user of the software; the author(s) is
|
import java.util.Properties;
|
||||||
// (are) also not responsible for proper configuration and usage of the
|
|
||||||
// software, even if provoked by documentation provided together with
|
import de.anomic.index.indexEntry;
|
||||||
// the software.
|
import de.anomic.index.indexEntryAttribute;
|
||||||
//
|
import de.anomic.index.indexAbstractEntry;
|
||||||
// Any changes to this file according to the GPL as documented in the file
|
import de.anomic.index.indexURL;
|
||||||
// gpl.txt aside this file in the shipment you received can be done to the
|
import de.anomic.kelondro.kelondroBase64Order;
|
||||||
// lines that follows this copyright notice here, but changes must not be
|
import de.anomic.plasma.plasmaWordIndex;
|
||||||
// done inside the copyright notive above. A re-distribution must contain
|
|
||||||
// the intact and unchanged copyright notice.
|
public final class indexURLEntry extends indexAbstractEntry implements Cloneable, indexEntry {
|
||||||
// Contributions and changes to the program code must be marked as such.
|
|
||||||
|
// an wordEntry can be filled in either of two ways:
|
||||||
/*
|
// by the discrete values of the entry
|
||||||
This class defines the structures of an index entry
|
// or by the encoded entry-string
|
||||||
*/
|
|
||||||
|
// the class instantiation can only be done by a plasmaStore method
|
||||||
package de.anomic.plasma;
|
// therefore they are all public
|
||||||
|
public indexURLEntry(String urlHash,
|
||||||
import java.util.Properties;
|
int urlLength, // byte-length of complete URL
|
||||||
|
int urlComps, // number of path components
|
||||||
import de.anomic.index.indexEntry;
|
int titleLength, // length of description/length (longer are better?)
|
||||||
import de.anomic.index.indexEntryAttribute;
|
int hitcount, //*how often appears this word in the text
|
||||||
import de.anomic.index.indexAbstractEntry;
|
int wordcount, //*total number of words
|
||||||
import de.anomic.index.indexURL;
|
int phrasecount, //*total number of phrases
|
||||||
import de.anomic.kelondro.kelondroBase64Order;
|
int posintext, //*position of word in all words
|
||||||
|
int posinphrase, //*position of word in its phrase
|
||||||
public final class plasmaWordIndexEntryInstance extends indexAbstractEntry implements Cloneable, indexEntry {
|
int posofphrase, //*number of the phrase where word appears
|
||||||
|
int distance, //*word distance; this is 0 by default, and set to the difference of posintext from two indexes if these are combined (simultanous search). If stored, this shows that the result was obtained by remote search
|
||||||
// an wordEntry can be filled in either of two ways:
|
int sizeOfPage, // # of bytes of the page
|
||||||
// by the discrete values of the entry
|
long lastmodified, //*last-modified time of the document where word appears
|
||||||
// or by the encoded entry-string
|
long updatetime, // update time; this is needed to compute a TTL for the word, so it can be removed easily if the TTL is short
|
||||||
|
int quality, //*the entropy value
|
||||||
// the class instantiation can only be done by a plasmaStore method
|
String language, //*(guessed) language of document
|
||||||
// therefore they are all public
|
char doctype, //*type of document
|
||||||
public plasmaWordIndexEntryInstance(String urlHash,
|
int outlinksSame, // outlinks to same domain
|
||||||
int urlLength, // byte-length of complete URL
|
int outlinksOther,// outlinks to other domain
|
||||||
int urlComps, // number of path components
|
boolean local //*flag shows that this index was generated locally; othervise its from a remote peer
|
||||||
int titleLength, // length of description/length (longer are better?)
|
) {
|
||||||
int hitcount, //*how often appears this word in the text
|
|
||||||
int wordcount, //*total number of words
|
// more needed attributes:
|
||||||
int phrasecount, //*total number of phrases
|
// - boolean: appearance attributes: title, appears in header, anchor-descr, image-tag etc
|
||||||
int posintext, //*position of word in all words
|
// - boolean: URL attributes
|
||||||
int posinphrase, //*position of word in its phrase
|
|
||||||
int posofphrase, //*number of the phrase where word appears
|
if ((language == null) || (language.length() != indexURL.urlLanguageLength)) language = "uk";
|
||||||
int distance, //*word distance; this is 0 by default, and set to the difference of posintext from two indexes if these are combined (simultanous search). If stored, this shows that the result was obtained by remote search
|
this.urlHash = urlHash;
|
||||||
int sizeOfPage, // # of bytes of the page
|
this.hitcount = hitcount;
|
||||||
long lastmodified, //*last-modified time of the document where word appears
|
this.wordcount = wordcount;
|
||||||
long updatetime, // update time; this is needed to compute a TTL for the word, so it can be removed easily if the TTL is short
|
this.phrasecount = phrasecount;
|
||||||
int quality, //*the entropy value
|
this.posintext = posintext;
|
||||||
String language, //*(guessed) language of document
|
this.posinphrase = posinphrase;
|
||||||
char doctype, //*type of document
|
this.posofphrase = posofphrase;
|
||||||
int outlinksSame, // outlinks to same domain
|
this.worddistance = distance;
|
||||||
int outlinksOther,// outlinks to other domain
|
this.lastModified = lastmodified;
|
||||||
boolean local //*flag shows that this index was generated locally; othervise its from a remote peer
|
this.quality = quality;
|
||||||
) {
|
this.language = language.getBytes();
|
||||||
|
this.doctype = doctype;
|
||||||
// more needed attributes:
|
this.localflag = (local) ? indexEntryAttribute.LT_LOCAL : indexEntryAttribute.LT_GLOBAL;
|
||||||
// - boolean: appearance attributes: title, appears in header, anchor-descr, image-tag etc
|
}
|
||||||
// - boolean: URL attributes
|
|
||||||
|
public indexURLEntry(String urlHash, String code) {
|
||||||
if ((language == null) || (language.length() != indexURL.urlLanguageLength)) language = "uk";
|
// the code is not parsed but used later on
|
||||||
this.urlHash = urlHash;
|
this.urlHash = urlHash;
|
||||||
this.hitcount = hitcount;
|
this.hitcount = (int) kelondroBase64Order.enhancedCoder.decodeLong(code.substring(6, 8));
|
||||||
this.wordcount = wordcount;
|
this.lastModified = plasmaWordIndex.reverseMicroDateDays((int) kelondroBase64Order.enhancedCoder.decodeLong(code.substring(3, 6)));
|
||||||
this.phrasecount = phrasecount;
|
this.quality = (int) kelondroBase64Order.enhancedCoder.decodeLong(code.substring(0, 3));
|
||||||
this.posintext = posintext;
|
this.language = code.substring(8, 10).getBytes();
|
||||||
this.posinphrase = posinphrase;
|
this.doctype = code.charAt(10);
|
||||||
this.posofphrase = posofphrase;
|
this.localflag = code.charAt(11);
|
||||||
this.worddistance = distance;
|
this.posintext = (code.length() >= 14) ? (int) kelondroBase64Order.enhancedCoder.decodeLong(code.substring(12, 14)) : 0;
|
||||||
this.lastModified = lastmodified;
|
this.posinphrase = (code.length() >= 15) ? (int) kelondroBase64Order.enhancedCoder.decodeLong(code.substring(14, 16)) : 0;
|
||||||
this.quality = quality;
|
this.posofphrase = (code.length() >= 17) ? (int) kelondroBase64Order.enhancedCoder.decodeLong(code.substring(16, 18)) : 0;
|
||||||
this.language = language.getBytes();
|
this.worddistance = (code.length() >= 19) ? (int) kelondroBase64Order.enhancedCoder.decodeLong(code.substring(18, 20)) : 0;
|
||||||
this.doctype = doctype;
|
this.wordcount = (code.length() >= 21) ? (int) kelondroBase64Order.enhancedCoder.decodeLong(code.substring(20, 22)) : 0;
|
||||||
this.localflag = (local) ? indexEntryAttribute.LT_LOCAL : indexEntryAttribute.LT_GLOBAL;
|
this.phrasecount = (code.length() >= 23) ? (int) kelondroBase64Order.enhancedCoder.decodeLong(code.substring(22, 24)) : 0;
|
||||||
}
|
if (hitcount == 0) hitcount = 1;
|
||||||
|
if (wordcount == 0) wordcount = 1000;
|
||||||
public plasmaWordIndexEntryInstance(String urlHash, String code) {
|
if (phrasecount == 0) phrasecount = 100;
|
||||||
// the code is not parsed but used later on
|
}
|
||||||
this.urlHash = urlHash;
|
|
||||||
this.hitcount = (int) kelondroBase64Order.enhancedCoder.decodeLong(code.substring(6, 8));
|
public indexURLEntry(String external) {
|
||||||
this.lastModified = plasmaWordIndex.reverseMicroDateDays((int) kelondroBase64Order.enhancedCoder.decodeLong(code.substring(3, 6)));
|
// parse external form
|
||||||
this.quality = (int) kelondroBase64Order.enhancedCoder.decodeLong(code.substring(0, 3));
|
String[] elts = external.substring(1, external.length() - 1).split(",");
|
||||||
this.language = code.substring(8, 10).getBytes();
|
Properties pr = new Properties();
|
||||||
this.doctype = code.charAt(10);
|
int p;
|
||||||
this.localflag = code.charAt(11);
|
for (int i = 0; i < elts.length; i++) {
|
||||||
this.posintext = (code.length() >= 14) ? (int) kelondroBase64Order.enhancedCoder.decodeLong(code.substring(12, 14)) : 0;
|
pr.put(elts[i].substring(0, (p = elts[i].indexOf("="))), elts[i].substring(p + 1));
|
||||||
this.posinphrase = (code.length() >= 15) ? (int) kelondroBase64Order.enhancedCoder.decodeLong(code.substring(14, 16)) : 0;
|
}
|
||||||
this.posofphrase = (code.length() >= 17) ? (int) kelondroBase64Order.enhancedCoder.decodeLong(code.substring(16, 18)) : 0;
|
// set values
|
||||||
this.worddistance = (code.length() >= 19) ? (int) kelondroBase64Order.enhancedCoder.decodeLong(code.substring(18, 20)) : 0;
|
this.urlHash = pr.getProperty("h", "");
|
||||||
this.wordcount = (code.length() >= 21) ? (int) kelondroBase64Order.enhancedCoder.decodeLong(code.substring(20, 22)) : 0;
|
this.hitcount = (int) kelondroBase64Order.enhancedCoder.decodeLong(pr.getProperty("c", "A"));
|
||||||
this.phrasecount = (code.length() >= 23) ? (int) kelondroBase64Order.enhancedCoder.decodeLong(code.substring(22, 24)) : 0;
|
this.wordcount = (int) kelondroBase64Order.enhancedCoder.decodeLong(pr.getProperty("w", "__"));
|
||||||
if (hitcount == 0) hitcount = 1;
|
this.phrasecount = (int) kelondroBase64Order.enhancedCoder.decodeLong(pr.getProperty("p", "__"));
|
||||||
if (wordcount == 0) wordcount = 1000;
|
this.posintext = (int) kelondroBase64Order.enhancedCoder.decodeLong(pr.getProperty("t", "__"));
|
||||||
if (phrasecount == 0) phrasecount = 100;
|
this.posinphrase = (int) kelondroBase64Order.enhancedCoder.decodeLong(pr.getProperty("r", "__"));
|
||||||
}
|
this.posofphrase = (int) kelondroBase64Order.enhancedCoder.decodeLong(pr.getProperty("o", "__"));
|
||||||
|
this.worddistance = (int) kelondroBase64Order.enhancedCoder.decodeLong(pr.getProperty("i", "__"));
|
||||||
public plasmaWordIndexEntryInstance(String external) {
|
this.lastModified = plasmaWordIndex.reverseMicroDateDays((int) kelondroBase64Order.enhancedCoder.decodeLong(pr.getProperty("a", "A")));
|
||||||
// parse external form
|
this.quality = (int) kelondroBase64Order.enhancedCoder.decodeLong(pr.getProperty("q", "__"));
|
||||||
String[] elts = external.substring(1, external.length() - 1).split(",");
|
this.language = pr.getProperty("l", "uk").getBytes();
|
||||||
Properties pr = new Properties();
|
this.doctype = pr.getProperty("d", "u").charAt(0);
|
||||||
int p;
|
this.localflag = pr.getProperty("f", ""+indexEntryAttribute.LT_LOCAL).charAt(0);
|
||||||
for (int i = 0; i < elts.length; i++) {
|
}
|
||||||
pr.put(elts[i].substring(0, (p = elts[i].indexOf("="))), elts[i].substring(p + 1));
|
|
||||||
}
|
public Object clone() {
|
||||||
// set values
|
return new indexURLEntry(this.toPropertyForm());
|
||||||
this.urlHash = pr.getProperty("h", "");
|
}
|
||||||
this.hitcount = (int) kelondroBase64Order.enhancedCoder.decodeLong(pr.getProperty("c", "A"));
|
|
||||||
this.wordcount = (int) kelondroBase64Order.enhancedCoder.decodeLong(pr.getProperty("w", "__"));
|
public static int encodedStringFormLength() {
|
||||||
this.phrasecount = (int) kelondroBase64Order.enhancedCoder.decodeLong(pr.getProperty("p", "__"));
|
// the size of the index entry attributes when encoded to string
|
||||||
this.posintext = (int) kelondroBase64Order.enhancedCoder.decodeLong(pr.getProperty("t", "__"));
|
return 24;
|
||||||
this.posinphrase = (int) kelondroBase64Order.enhancedCoder.decodeLong(pr.getProperty("r", "__"));
|
}
|
||||||
this.posofphrase = (int) kelondroBase64Order.enhancedCoder.decodeLong(pr.getProperty("o", "__"));
|
|
||||||
this.worddistance = (int) kelondroBase64Order.enhancedCoder.decodeLong(pr.getProperty("i", "__"));
|
public String toEncodedStringForm() {
|
||||||
this.lastModified = plasmaWordIndex.reverseMicroDateDays((int) kelondroBase64Order.enhancedCoder.decodeLong(pr.getProperty("a", "A")));
|
// attention: this integrates NOT the URL hash into the encoding
|
||||||
this.quality = (int) kelondroBase64Order.enhancedCoder.decodeLong(pr.getProperty("q", "__"));
|
// if you need a complete dump, use toExternalForm()
|
||||||
this.language = pr.getProperty("l", "uk").getBytes();
|
StringBuffer buf = new StringBuffer(encodedStringFormLength());
|
||||||
this.doctype = pr.getProperty("d", "u").charAt(0);
|
|
||||||
this.localflag = pr.getProperty("f", ""+indexEntryAttribute.LT_LOCAL).charAt(0);
|
buf.append(kelondroBase64Order.enhancedCoder.encodeLongSmart(this.quality, indexURL.urlQualityLength))
|
||||||
}
|
.append(kelondroBase64Order.enhancedCoder.encodeLongSmart(plasmaWordIndex.microDateDays(this.lastModified), 3))
|
||||||
|
.append(kelondroBase64Order.enhancedCoder.encodeLongSmart(this.hitcount, 2))
|
||||||
public Object clone() {
|
.append(new String(this.language))
|
||||||
return new plasmaWordIndexEntryInstance(this.toPropertyForm());
|
.append(this.doctype)
|
||||||
}
|
.append(this.localflag)
|
||||||
|
.append(kelondroBase64Order.enhancedCoder.encodeLongSmart(this.posintext, 2))
|
||||||
public static int encodedStringFormLength() {
|
.append(kelondroBase64Order.enhancedCoder.encodeLongSmart(this.posinphrase, 2))
|
||||||
// the size of the index entry attributes when encoded to string
|
.append(kelondroBase64Order.enhancedCoder.encodeLongSmart(this.posofphrase, 2))
|
||||||
return 24;
|
.append(kelondroBase64Order.enhancedCoder.encodeLongSmart(this.worddistance, 2))
|
||||||
}
|
.append(kelondroBase64Order.enhancedCoder.encodeLongSmart(this.wordcount, 2))
|
||||||
|
.append(kelondroBase64Order.enhancedCoder.encodeLongSmart(this.phrasecount, 2)); // 3+3+2+2+1+1+2+2+2+2+2+2= 24 bytes
|
||||||
public String toEncodedStringForm() {
|
|
||||||
// attention: this integrates NOT the URL hash into the encoding
|
return buf.toString();
|
||||||
// if you need a complete dump, use toExternalForm()
|
}
|
||||||
StringBuffer buf = new StringBuffer(encodedStringFormLength());
|
|
||||||
|
public static int encodedByteArrayFormLength() {
|
||||||
buf.append(kelondroBase64Order.enhancedCoder.encodeLongSmart(this.quality, indexURL.urlQualityLength))
|
// the size of the index entry attributes when encoded to string
|
||||||
.append(kelondroBase64Order.enhancedCoder.encodeLongSmart(plasmaWordIndex.microDateDays(this.lastModified), 3))
|
return encodedStringFormLength();
|
||||||
.append(kelondroBase64Order.enhancedCoder.encodeLongSmart(this.hitcount, 2))
|
}
|
||||||
.append(new String(this.language))
|
|
||||||
.append(this.doctype)
|
public byte[] toEncodedByteArrayForm() {
|
||||||
.append(this.localflag)
|
return toEncodedStringForm().getBytes();
|
||||||
.append(kelondroBase64Order.enhancedCoder.encodeLongSmart(this.posintext, 2))
|
}
|
||||||
.append(kelondroBase64Order.enhancedCoder.encodeLongSmart(this.posinphrase, 2))
|
|
||||||
.append(kelondroBase64Order.enhancedCoder.encodeLongSmart(this.posofphrase, 2))
|
public String toPropertyForm() {
|
||||||
.append(kelondroBase64Order.enhancedCoder.encodeLongSmart(this.worddistance, 2))
|
StringBuffer str = new StringBuffer(61);
|
||||||
.append(kelondroBase64Order.enhancedCoder.encodeLongSmart(this.wordcount, 2))
|
|
||||||
.append(kelondroBase64Order.enhancedCoder.encodeLongSmart(this.phrasecount, 2)); // 3+3+2+2+1+1+2+2+2+2+2+2= 24 bytes
|
str.append("{")
|
||||||
|
.append( "h=").append(this.urlHash)
|
||||||
return buf.toString();
|
.append(",q=").append(kelondroBase64Order.enhancedCoder.encodeLongSmart(this.quality, indexURL.urlQualityLength))
|
||||||
}
|
.append(",a=").append(kelondroBase64Order.enhancedCoder.encodeLongSmart(plasmaWordIndex.microDateDays(this.lastModified), 3))
|
||||||
|
.append(",c=").append(kelondroBase64Order.enhancedCoder.encodeLongSmart(this.hitcount, 2))
|
||||||
public static int encodedByteArrayFormLength() {
|
.append(",l=").append(new String(this.language))
|
||||||
// the size of the index entry attributes when encoded to string
|
.append(",d=").append(this.doctype)
|
||||||
return encodedStringFormLength();
|
.append(",f=").append(this.localflag)
|
||||||
}
|
.append(",t=").append(kelondroBase64Order.enhancedCoder.encodeLongSmart(this.posintext, 2))
|
||||||
|
.append(",r=").append(kelondroBase64Order.enhancedCoder.encodeLongSmart(this.posinphrase, 2))
|
||||||
public byte[] toEncodedByteArrayForm() {
|
.append(",o=").append(kelondroBase64Order.enhancedCoder.encodeLongSmart(this.posofphrase, 2))
|
||||||
return toEncodedStringForm().getBytes();
|
.append(",i=").append(kelondroBase64Order.enhancedCoder.encodeLongSmart(this.worddistance, 2))
|
||||||
}
|
.append(",w=").append(kelondroBase64Order.enhancedCoder.encodeLongSmart(this.wordcount, 2))
|
||||||
|
.append(",p=").append(kelondroBase64Order.enhancedCoder.encodeLongSmart(this.phrasecount, 2))
|
||||||
public String toPropertyForm() {
|
.append("}");
|
||||||
StringBuffer str = new StringBuffer(61);
|
|
||||||
|
return str.toString();
|
||||||
str.append("{")
|
}
|
||||||
.append( "h=").append(this.urlHash)
|
|
||||||
.append(",q=").append(kelondroBase64Order.enhancedCoder.encodeLongSmart(this.quality, indexURL.urlQualityLength))
|
public static void main(String[] args) {
|
||||||
.append(",a=").append(kelondroBase64Order.enhancedCoder.encodeLongSmart(plasmaWordIndex.microDateDays(this.lastModified), 3))
|
// outputs the word hash to a given word
|
||||||
.append(",c=").append(kelondroBase64Order.enhancedCoder.encodeLongSmart(this.hitcount, 2))
|
if (args.length != 1) System.exit(0);
|
||||||
.append(",l=").append(new String(this.language))
|
System.out.println("WORDHASH: " + indexEntryAttribute.word2hash(args[0]));
|
||||||
.append(",d=").append(this.doctype)
|
}
|
||||||
.append(",f=").append(this.localflag)
|
|
||||||
.append(",t=").append(kelondroBase64Order.enhancedCoder.encodeLongSmart(this.posintext, 2))
|
}
|
||||||
.append(",r=").append(kelondroBase64Order.enhancedCoder.encodeLongSmart(this.posinphrase, 2))
|
|
||||||
.append(",o=").append(kelondroBase64Order.enhancedCoder.encodeLongSmart(this.posofphrase, 2))
|
|
||||||
.append(",i=").append(kelondroBase64Order.enhancedCoder.encodeLongSmart(this.worddistance, 2))
|
|
||||||
.append(",w=").append(kelondroBase64Order.enhancedCoder.encodeLongSmart(this.wordcount, 2))
|
|
||||||
.append(",p=").append(kelondroBase64Order.enhancedCoder.encodeLongSmart(this.phrasecount, 2))
|
|
||||||
.append("}");
|
|
||||||
|
|
||||||
return str.toString();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void main(String[] args) {
|
|
||||||
// outputs the word hash to a given word
|
|
||||||
if (args.length != 1) System.exit(0);
|
|
||||||
System.out.println("WORDHASH: " + indexEntryAttribute.word2hash(args[0]));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
Loading…
Reference in new issue