Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Substring search on an array of strings
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Diego Olivier Fernandez Pons <Diego.FERNANDEZ_PONS@e...>
Subject: [Caml-list] Substring search on an array of strings
    Bonjour,

Caml Str library does not seem to provide a function allowing to match
efficently a string in a array of strings.

I was wondering if there were already known algorithms for this before
I try the workarounds I had in mind :

i) building a 'superstring' with the array of strings (the shortest
superstring problem is NP but there are simple primal-dual
approximation algorithms) and use a classical search algorithm.

ii) try to lift the suffix Knuth-Morris-Prat automaton to work on the
union of the words instead of a single word (is this possible ?)


        Diego Olivier

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners