Skip Menu |

This queue is for tickets about the Tree-Suffix CPAN distribution.

Report information
The Basics
Id: 20468
Status: open
Priority: 0/
Queue: Tree-Suffix

People
Owner: Nobody in particular
Requestors: jmarca [...] translab.its.uci.edu
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: feature request / advice on expanded alphabet implementation
In your documentation, you mention in the To Do list: User-definable string types (e.g. > 256 char alphabets). I need to use this, but my C skills and XS skills are quite poor. Do you have any pointers on how to implement expanded alphabets? My first thought would be to convert the char version in the libstree code to long, which should be workable as an index into an arbitrarily large set of alphabet nodes. But I'm likely to spend days figuring out how to compare/copy/print longs in C. I'd rather do the compare copy and print code in Perl and plug that in to the XS code somehow. Is that even possible? Cheers, and thanks for your work setting this module up James
From: gray [...] cpan.org
somebody has already asked me about this- the short answer is that it can be emulated, but won't be supported natively. i'm pasting the correspondence below in the hope that it helps you and any others in the future. fyi, it looks like the library is not actively being maintained, so i have no future plans for this module. Show quoted text
>>>>>>>>>>
I've been experimenting with Tree::Suffix today and I have a question I hope you can help me out with. My "alphabet" consists of more than 256 letters, so I've had to encode them as multicharacter strings. I think that libstree supports this. But I've looked through your documentation and tests and can't see a way to do it with Tree::Suffix. Right now I'm separating each letter by commas. So my strings look like this: aa, ab, ac, aa That works, but it would be nice if this were supported natively. Is that something you're planning on working on? ----- i wasn't planning on it, but if you have any suggestions, or a patch, to easily accomlish this, they would be most welcome. i've only glanced at that part of the library code, but would it be enough to allow item_size (in lst_string_new) to be modified? then you could make a call like $tree->letter_size(2) before inserting any strings. I'm not sure if that would work or if a new LST_StringClass would need to be created. ----- Sorry I didn't get back to you earlier. I tried using the library directly with some C code but I couldn't get that to work, either. I emailed the author of the library, but he hasn't gotten back to me yet. Since the library may not do what I want, it's probably not worth your spending any time on the Perl front end just yet. I'll let you know when and if I hear back from Christian. Show quoted text
>>>>>>>>>>
On Fri Jul 14 18:49:48 2006, jmarca wrote: Show quoted text
> In your documentation, you mention in the To Do list: User-definable > string types (e.g. > 256 char alphabets). I need to use this, but my C > skills and XS skills are quite poor. Do you have any pointers on how to > implement expanded alphabets? > > My first thought would be to convert the char version in the libstree > code to long, which should be workable as an index into an arbitrarily > large set of alphabet nodes. But I'm likely to spend days figuring out > how to compare/copy/print longs in C. I'd rather do the compare copy > and print code in Perl and plug that in to the XS code somehow. Is that > even possible? > > Cheers, and thanks for your work setting this module up > James >
Subject: Re: [rt.cpan.org #20468] feature request / advice on expanded alphabet implementation
Date: Tue, 18 Jul 2006 09:33:58 -0700
To: gray via RT <bug-Tree-Suffix [...] rt.cpan.org>
From: James Marca <jmarca [...] translab.its.uci.edu>
Thanks for the reply and pointers. We've got a long int-based alphabet working in C, so I think we're going to use the libstree library for the time being. If we can cleanly hack the .XS code to allow our integer alphabet we will submit patches. James At approximately Mon, Jul 17, 2006 at 03:39:21AM -0400, gray via RT wrote: Show quoted text
> > <URL: http://rt.cpan.org/Ticket/Display.html?id=20468 > > > somebody has already asked me about this- the short answer is that it > can be emulated, but won't be supported natively. i'm pasting the > correspondence below in the hope that it helps you and any others in the > future. fyi, it looks like the library is not actively being > maintained, so i have no future plans for this module. >