English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
ocamlagrep anybody ?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2006-05-08 (15:36)
From: Ingo Bormuth <ibormuth@e...>
Subject: Re: [Caml-list] ocamlagrep anybody ?

Thank's for the prompt reply! Thanks for the language anyway.

On 2006-05-08 14:10, Xavier Leroy wrote:
> It's been a long time since I wrote this library, but AFAIK
> Agrep stops at the first (approximate) match found.

Okay, that seems reasonable. Just the manual is a bit misleading:

  val errors_substring_match ... Same as Agrep.substring_match, but 
  return the smallest number of errors such that the substring matches 
  the pattern.

> If that's what you want, you can obtain that number by repeated calls
> to errors_substring_match using binary search on the value of numerrs.

That's what I did. Just performance on millions of strings sucks :)
Probably I will tokenize the strings and just match tokens.

- Ingo

Ingo Bormuth, voicebox & telefax: +49-12125-10226517       '(~o-o~)'
public key 86326EC9, http://ibormuth.efil.de/contact   --ooO--(.)--Ooo--