AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Boyer-Moore Search

Ein Thema von mohfa · begonnen am 22. Jan 2009 · letzter Beitrag vom 22. Jan 2009
Antwort Antwort
mohfa

Registriert seit: 11. Feb 2007
97 Beiträge
 
Delphi 7 Enterprise
 
#1

Boyer-Moore Search

  Alt 22. Jan 2009, 19:10
Hi , is there any version of Boyer-Moore search function that deals with the WildCards feature ?


Thank you all
  Mit Zitat antworten Zitat
Benutzerbild von 3_of_8
3_of_8

Registriert seit: 22. Mär 2005
Ort: Dingolfing
4.129 Beiträge
 
Turbo Delphi für Win32
 
#2

Re: Boyer-Moore Search

  Alt 22. Jan 2009, 19:30
Well, I don't think so. What do you need it for? Are regular expressions not sufficient?
Manuel Eberl
„The trouble with having an open mind, of course, is that people will insist on coming along and trying to put things in it.“
- Terry Pratchett
  Mit Zitat antworten Zitat
mohfa

Registriert seit: 11. Feb 2007
97 Beiträge
 
Delphi 7 Enterprise
 
#3

Re: Boyer-Moore Search

  Alt 22. Jan 2009, 19:34
Thank you 3_of_8 ,
Zitat:
Are regular expressions not sufficient
No , but it doesn't do what i'm looking for , and i'm looking for a Fast pos function like the One used in the FastStrings ( But even FastStrings doesn't support the WildCard ).


Is there any other alternative ?
  Mit Zitat antworten Zitat
alzaimar
(Moderator)

Registriert seit: 6. Mai 2005
Ort: Berlin
4.956 Beiträge
 
Delphi 2007 Enterprise
 
#4

Re: Boyer-Moore Search

  Alt 22. Jan 2009, 19:39
BM is by definition not suitable for wildcards. It uses good and bad suffix tables which are based on exact characters. So the algorithm just won't fit.
You might try looking for a variation of the Knuth-Morris-Pratt algorithm which uses wildcard characters. The KMP uses a DEA which supports wildcards.
"Wenn ist das Nunstruck git und Slotermeyer? Ja! Beiherhund das Oder die Flipperwaldt gersput!"
(Monty Python "Joke Warefare")
  Mit Zitat antworten Zitat
Benutzerbild von 3_of_8
3_of_8

Registriert seit: 22. Mär 2005
Ort: Dingolfing
4.129 Beiträge
 
Turbo Delphi für Win32
 
#5

Re: Boyer-Moore Search

  Alt 22. Jan 2009, 19:42
What do you mean, doesn't do what you're looking for? If by wildcards you mean placeholders, why would regular expressions not be able to do that?
Manuel Eberl
„The trouble with having an open mind, of course, is that people will insist on coming along and trying to put things in it.“
- Terry Pratchett
  Mit Zitat antworten Zitat
alzaimar
(Moderator)

Registriert seit: 6. Mai 2005
Ort: Berlin
4.956 Beiträge
 
Delphi 2007 Enterprise
 
#6

Re: Boyer-Moore Search

  Alt 22. Jan 2009, 20:33
@3_of_8:Regular Expressions 'might' be too slow, but I would suggest giving it a try. I would think that the TRegExpr-Implementation is not that bad. However, an optimized KMP* (or something similar) might be much faster, but to be honest, I am too lazy to find that out right now. There should be oodles of implementations out there.
"Wenn ist das Nunstruck git und Slotermeyer? Ja! Beiherhund das Oder die Flipperwaldt gersput!"
(Monty Python "Joke Warefare")
  Mit Zitat antworten Zitat
Benutzerbild von RWarnecke
RWarnecke

Registriert seit: 31. Dez 2004
Ort: Stuttgart
4.408 Beiträge
 
Delphi XE8 Enterprise
 
#7

Re: Boyer-Moore Search

  Alt 22. Jan 2009, 21:58
Look at this Link
Rolf Warnecke
App4Mission
  Mit Zitat antworten Zitat
Benutzerbild von 3_of_8
3_of_8

Registriert seit: 22. Mär 2005
Ort: Dingolfing
4.129 Beiträge
 
Turbo Delphi für Win32
 
#8

Re: Boyer-Moore Search

  Alt 22. Jan 2009, 22:05
Zitat von alzaimar:
@3_of_8:Regular Expressions 'might' be too slow, but I would suggest giving it a try. I would think that the TRegExpr-Implementation is not that bad. However, an optimized KMP* (or something similar) might be much faster, but to be honest, I am too lazy to find that out right now. There should be oodles of implementations out there.
Aye, but he said regular expressions "don't do what he wants", he did not say they were just not doing it fast enough. And I think that if I don't have a completely different concept of wildcards, regular expressions should be more that enough to do what he wants to do. The speed, well, as you said, it's best to just try it out.
Manuel Eberl
„The trouble with having an open mind, of course, is that people will insist on coming along and trying to put things in it.“
- Terry Pratchett
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 05:43 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz