Git Product home page Git Product logo

Comments (2)

af-mst avatar af-mst commented on May 28, 2024

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.

a7744hsc avatar a7744hsc commented on May 28, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.