Comments (2)
Hi,
we have a similar issue.
The Add was wokring all the time until someone added a word with an "ss" in the database.
After some data research we found out, that normaly we add those words with the character "ß" (we are from germany, "ss" and "ß" as interchangable ;)
So we pulled the code and debugged it.
The issue appeared here:
var newEdge = new Edge<T>(remainder, newNode);
e.Label = e.Label.Substring(remainder.Length);
newNode.AddEdge(e.Label[0], e); // !!! HERE !!!
s.AddEdge(t, newEdge);
(UkkonenTrie.cs -> Line: 207)
word: "walross"
remainder at that point: "oss"
e.label at that point = "oße"
and "e.Label = e.Label.Substring(remainder.Length);" will result in an empty string instead of the "e", which lets the next line fail with an out of index exception:
"newNode.AddEdge(e.Label[0], e);"
I guess, that you internally transform the "ß" to ss? Or that the code is interpretating the "ss" as "ß"?
Anyhow the code wants to use the "oss" node for the "oß" value :(
Our current workaround is to tralce all "ß" with "ss" and thats it, but it has annoying implications.
Thank you
Kind Regards
from trienet.
This issue seems like being caused by globalization, I solved this issue by add the following runtime option:
{ "runtimeOptions": { "configProperties": { "System.Globalization.Invariant": true } } }
UPDATED======
For my case, the root cause of this issue is that at least in "en-US" and "中文(**)" Culture, "ANYSTR".StartsWith("ANYSTR\u200B") returns True
This issue happens on Linux (for my case Ubuntu 18.04) but does not exist on Windows 10。
from trienet.
Related Issues (12)
- Only for English? HOT 1
- Net standard 2.0 nuget package is not uploaded HOT 4
- Only one search result instead of two
- Binary targeting .NET Framework 4.5?
- Another Unicode issue HOT 3
- Storing UkkonenTrie in Redis
- Case sensitivity HOT 2
- Not an issue - "fork" or contribution? HOT 2
- Incompatible with UWP because of String.Intern()
- Pattern / wildcard search
- Implement Update and Delete HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from trienet.