acora icon indicating copy to clipboard operation
acora copied to clipboard

Implement Mapping : Add a value to each sequence stored in the automaton

Open pombredanne opened this issue 10 years ago • 3 comments

This would essentially turn this in a dictionary. Most AC implementation do that and this makes Acora a tad hard to use or useless .... Having a simple numeric id returned and assigned to each string added would go a long way.

pombredanne avatar Jan 03 '16 12:01 pombredanne

acora currently stores the keywords as Python string objects, so id() should work on them.

scoder avatar Jan 09 '16 08:01 scoder

Sorry if I was not clear: what I am looking for is for the automaton to behave as a dict-like mapping: for each key, (which in my case may be anywhere between 1 and 60K long) I would like to store the corresponding value.

pombredanne avatar Jun 15 '16 05:06 pombredanne

@scoder What I really mean is to make this a dictionary-like. Such that you can get a value from a search and not only the key. In particular when you store long sequences, getting the key back is not useful.

pombredanne avatar Jun 24 '16 09:06 pombredanne