Git Product home page Git Product logo

trienet's Issues

Case sensitivity

How do I turn off case sensitivity? So I can retrieve strings even when they are not the same case as the filter. As a work around I have to retrieve for each permutation of capitalization and concatenate the results together.

Another Unicode issue

Ran into an issue with unicode 0x300. This can be reproduced with the below code:

var a= "rosalía castro";
var b= "rosalía";
var t = new UkkonenTrie<int>(3);
t.Add(a, 1);
t.Add(b, 2);
Console.WriteLine(t.Retrieve(a).Count());

This will print 0. Note that the second item added is not a byte-equal prefix of s, their unicode sequences are different. Though a.StartsWith(b) returns true, presumably because of culture settings. The second one uses two characters: a normal 'i' followed by unicode 0x300 to add the accent, while the first one uses a single accented i character.

Only one search result instead of two

var trie = new SuffixTrie<int>(3);

trie.Add("hello", 1);
trie.Add("world", 2);
trie.Add("hell", 3);

var result = trie.Retrieve("ll");

The result has only 1 as an element, however, there should be 1 and 3 as results.
And if you replace trie.Add("hell", 3) with trie.Add("hell3", 3), it works as expected (1, 3 are results).

Binary targeting .NET Framework 4.5?

Would it be possible to add support for .NET Framework 4.5? I need it for a project that's still targeting net45 and since the package currently supports .NET Standard 2.0, I had to create a new package out of it, after adding necessary targeting. It'd be great if that can be added here (maybe a different branch that can create a new package?) I am not sure if any of the previous versions have a support for net45.

Not an issue - "fork" or contribution?

Hi,
I don't know if you are interested in this but I added .net core 2.1 targeted projects to your solution. I'm new to contributing on git so please pull or let me if helpful / "what's the right way to contribute".

https://github.com/dgerding/trienet.git

I can say my limited testing does seem to support MS' claims that .net core 2.1 is faster!

Thanks again.

Dave Gerding

Some issue with Unicode characters, maybe

Got an exception

System.ArgumentOutOfRangeException: startIndex cannot be larger than length of string. Parameter name: startIndex at System.String.Substring(Int32 startIndex, Int32 length) at Gma.DataStructures.StringSearch.UkkonenTrie1.TestAndSplit(Node1 inputs, String stringPart, Char t, String remainder, T value) at Gma.DataStructures.StringSearch.UkkonenTrie1.Update(Node1 inputNode, String stringPart, String rest, T value) at Gma.DataStructures.StringSearch.UkkonenTrie`1.Add(String key, T value) at TPB.Business.PirateBayDumpProcessor.Process(FileInfo file) in D:_Projects\TPB\TPB.Business\PirateBayDumpProcessor.cs:line 57 at TPB.ConsoleTester.Program.Main(String[] args) in D:_Projects\TPB\TPB.ConsoleTester\Program.cs:line 12} | System.ArgumentOutOfRangeException

when trying (pun not intended): trie.Add(entry.Name, entry);
where entry.Name was Tjockare än vatten (Thicker Than Water) - S02 E08 - 720p x265 H

Implement Update and Delete

Hi,

is it possible to update the value T on a word when it is already stored ?
As it seems now I have to destroy the the whole Trie structure and rebuild it ?

Incompatible with UWP because of String.Intern()

I am using trienet within my UWP App, however I had to remove all the calls to string.Intern() (here and here), and replace them by simple string assignements such as m_Origin = origin, because the .NET team decided to remove methods which they "regretted adding in the first place, or restricted our plans around innovating for the future." (according to David Kean).

However, I'm guessing this has a negative impact on performance. Is there anyway to limit this?

Pattern / wildcard search

Is it possible to search for patterns also maybe with any Wildcard character like *

B*as would find all bananas and all baristas for example.

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.