mirror of
https://github.com/MarginaliaSearch/MarginaliaSearch.git
synced 2025-10-05 21:22:39 +02:00
(language) Add support for downloadable resources, parsing POS tag configuration tags
This commit is contained in:
@@ -57,12 +57,20 @@ public class MurmurHash3_128 {
|
||||
return hash64(data, 0, data.length(), data.hashCode());
|
||||
}
|
||||
|
||||
/** Like hashASCIIOnly except seeded with the Java String.hashCode()
|
||||
* to provide better behavior for non-ASCII strings. It's much worse
|
||||
* than doing it properly, but better than not doing this.
|
||||
*/
|
||||
public long hashUtf8(String data) {
|
||||
return hash64(data, 0, data.length(), DEFAULT_SEED);
|
||||
}
|
||||
|
||||
/** Select the hash function appropriate for keywords based system configuration,
|
||||
* and hash the keyword.
|
||||
*/
|
||||
public long hashKeyword(String data) {
|
||||
if (NO_FLATTEN_UNICODE) {
|
||||
return hash64(data, 0, data.length(), DEFAULT_SEED);
|
||||
return hashUtf8(data);
|
||||
}
|
||||
else {
|
||||
return hashNearlyASCII(data);
|
||||
|
Reference in New Issue
Block a user