Hi all,
I want to build a compressed suffix trie from a string for string
matching.instead of doing like:
input:a string with 10 chars
insert char array 10
insert char array 9,10
insert char array 8,9,10
....
insert char array 1,2,3,4,5,6,7,8,9,10
is there any efficient way to build a trie?
the above method is toooo slow and consum much memory!
Thanks a lot guys 3 4350
Joseph wrote: I want to build a compressed suffix trie from a string for string matching.instead of doing like:
input:a string with 10 chars
insert char array 10 insert char array 9,10 insert char array 8,9,10 ... insert char array 1,2,3,4,5,6,7,8,9,10
is there any efficient way to build a trie? the above method is toooo slow and consum much memory!
char array[11] = {0};
const char * const trie[] = { array + 9, array + 8, ... , array };
Now input your 10 chars in 'array' and use 'trie[5]' to get to
the fifth (sixth) "string".
You can use the same method for dynamically sized string and trie.
Victor
Victor Bazarov <v.********@comAcast.net> wrote in news:ZAi4d.2801$Ae.2102
@newsread1.dllstx09.us.to.verio.net: Joseph wrote: I want to build a compressed suffix trie from a string for string matching.instead of doing like:
input:a string with 10 chars
insert char array 10 insert char array 9,10 insert char array 8,9,10 ... insert char array 1,2,3,4,5,6,7,8,9,10
is there any efficient way to build a trie? the above method is toooo slow and consum much memory!
char array[11] = {0}; const char * const trie[] = { array + 9, array + 8, ... , array };
Now input your 10 chars in 'array' and use 'trie[5]' to get to the fifth (sixth) "string".
You can use the same method for dynamically sized string and trie.
Victor
Oh ,sorry ,I mean,is there any faster way to do the compression?
OR a dynamic way ?to do the insertion and compression at same time
Joseph wrote: Victor Bazarov <v.********@comAcast.net> wrote in news:ZAi4d.2801$Ae.2102 @newsread1.dllstx09.us.to.verio.net:
Joseph wrote:
I want to build a compressed suffix trie from a string for string matching.instead of doing like:
input:a string with 10 chars
insert char array 10 insert char array 9,10 insert char array 8,9,10 ... insert char array 1,2,3,4,5,6,7,8,9,10
is there any efficient way to build a trie? the above method is toooo slow and consum much memory!
char array[11] = {0}; const char * const trie[] = { array + 9, array + 8, ... , array };
Now input your 10 chars in 'array' and use 'trie[5]' to get to the fifth (sixth) "string".
You can use the same method for dynamically sized string and trie.
Victor
Oh ,sorry ,I mean,is there any faster way to do the compression?
OR a dynamic way ?to do the insertion and compression at same time
Oh, sorry, I thought you're asking a C++ language question. You should
find a better place to ask general programming questions, like forum
'comp.programming' or anything related to compression...
V This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Keith Bowes |
last post by:
I have a script for requesting HTTP resources and I want it to use HTTP
compression (to reduce bandwidth), if possible. What's the best way to
do this? I've tried using zlib functions but they...
|
by: Klaus Neuner |
last post by:
Hello,
I need a function that converts a list into a set of regexes. Like so:
string_list =
print string_list2regexes(string_list)
This should return something like:
|
by: Dennis Hotson |
last post by:
Hi,
I'm trying to write a function that adds a file-like-object to a
compressed tarfile... eg ".tar.gz" or ".tar.bz2"
I've had a look at the tarfile module but the append mode doesn't support...
|
by: Polar |
last post by:
Hi!
Do you know a C library for trie data structures (a particular type of
tree)? And some link about trie with C language?
Thank you
Polar
|
by: Paul |
last post by:
Does anyone have an example of a trie data structure implemented in c#? I'm
looking for a string trie to use to hold the word list for my spell checker.
Any examples or suggestions would be great....
|
by: Pavel |
last post by:
Hello.
I am trying to make a folder compressed and failing miserably. Below
are three ways that I tried to make it compressed, all of them compile
and run w/o any problems, but the folder is...
|
by: robert |
last post by:
Hello,
I want to put (incrementally) changed/new files from a big file tree
"directly,compressed and password-only-encrypted" to a remote backup
server incrementally via FTP,SFTP or DAV.... At...
|
by: clintp |
last post by:
I've seen a few people asking for this elsewhere, so here's a basic
implementation of a string trie in C#. I'm using this to load and
search a dictionary of about two hundred thousand words. It's...
|
by: iaminsik |
last post by:
I implemented a TRIE in memory by myself in C.
But, as you know, when a size of data increases, loading time of data
becomes longer.
I want to implement a TRIE in file, which means division of...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |