AGB  ·  Datenschutz  ·  Impressum  







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

Google Meinten Sie

Ein Thema von API · begonnen am 6. Aug 2006 · letzter Beitrag vom 12. Sep 2006
Antwort Antwort
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
 
#1

Re: Google Meinten Sie

  Alt 6. Aug 2006, 12:41
Tja, lies dir ein C++ Tutorial durch.

Oder, noch ne Idee, du überprüfst SoundEx Werte, und zwar die vom eingegebenen Wort mit Wörtern in einer Datenbank, wobei die Wörter in der Datenbank, die öfter eingegeben werden, Vorrang haben.

Delphi-Quellcode:
type
  TWord = record
    text: String;
    count: Integer;
  end;

var Words: array of TWord;

//...

function GetSimilar(str: String): String;
var I: Integer;
    bestindex, bestcount: Integer;
begin
  bestcount:=0;
  bestindex:=-1;
  for I:=0 to high(Words) do
    if (soundexsimilar(str, words[I].text)) and (words[I].count>bestcount) then
    begin
      bestcount:=words[I].count;
      bestindex:=I;
    end;
  if bestindex=-1 then result:='else result:=words[bestindex].text;
end;
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 03:20 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz