<?xml version='1.0' encoding="utf-8"?>
      <rss version='2.0'>
      <channel>
      <title>Форум на Исходниках.RU</title>
      <link>https://forum.sources.ru</link>
      <description>Форум на Исходниках.RU</description>
      <generator>Форум на Исходниках.RU</generator>
  	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=127806&amp;view=findpost&amp;p=971400</guid>
        <pubDate>Fri, 06 Jan 2006 11:01:33 +0000</pubDate>
        <title>Сравнить две строки</title>
        <link>https://forum.sources.ru/index.php?showtopic=127806&amp;view=findpost&amp;p=971400</link>
        <description><![CDATA[Mastilior: <div class='tag-quote'><a class='tag-quote-link' href='https://forum.sources.ru/index.php?showtopic=127806&view=findpost&p=970187'><span class='tag-quote-prefix'>Цитата</span></a> <span class='tag-quote__quote-info'>Romtek &#064; <time class="tag-quote__quoted-time" datetime="2006-01-05T12:39:38+03:00">05.01.06, 09:39</time></span><div class='quote '>Думаю, что функция SoundEx тоже поможет, хотя у неё немного другие особенности. Она реализована и в Дельфи, и в VB, и где только нет.<br>
Вдобавок, эта ссылка по SoundEx побольше разъяснит: Understanding Classic SoundEx Algorithms</div></div><br>
Спасибо, будем вникать&#33;]]></description>
        <author>Mastilior</author>
        <category>Алгоритмы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=127806&amp;view=findpost&amp;p=970187</guid>
        <pubDate>Thu, 05 Jan 2006 09:39:38 +0000</pubDate>
        <title>Сравнить две строки</title>
        <link>https://forum.sources.ru/index.php?showtopic=127806&amp;view=findpost&amp;p=970187</link>
        <description><![CDATA[Romtek: Думаю, что функция SoundEx тоже поможет, хотя у неё немного другие особенности. Она реализована и в Дельфи, и в VB, и где только нет.<br>
Вдобавок, эта ссылка по SoundEx побольше разъяснит: <a class='tag-url' href='http://www.creativyst.com/Doc/Articles/SoundEx1/SoundEx1.htm' target='_blank'>Understanding Classic SoundEx Algorithms</a>]]></description>
        <author>Romtek</author>
        <category>Алгоритмы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=127806&amp;view=findpost&amp;p=970169</guid>
        <pubDate>Thu, 05 Jan 2006 09:16:58 +0000</pubDate>
        <title>Сравнить две строки</title>
        <link>https://forum.sources.ru/index.php?showtopic=127806&amp;view=findpost&amp;p=970169</link>
        <description><![CDATA[Mastilior: <strong class='tag-b'>Romtek</strong>, спасибо за ссылки&#33;&#33;&#33; ;)]]></description>
        <author>Mastilior</author>
        <category>Алгоритмы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=127806&amp;view=findpost&amp;p=970016</guid>
        <pubDate>Thu, 05 Jan 2006 00:30:51 +0000</pubDate>
        <title>Сравнить две строки</title>
        <link>https://forum.sources.ru/index.php?showtopic=127806&amp;view=findpost&amp;p=970016</link>
        <description><![CDATA[Romtek: <strong class='tag-b'>Mastilior</strong>, <a class='tag-url' href='http://forum.sources.ru/storage/dokuwiki/doku.php?id=faq:pascal:fuzzy_search' target='_blank'>Нечёткий поиск</a> <br>
<br>
<span class="tag-color tag-color-named" data-value="gray" style="color: gray"><span class='tag-size' data-value='7' style='font-size:7pt;'>Добавлено <time class="tag-mergetime" datetime="2006-01-05T00:33:33+00:00">05.01.06, 00:33</time></span></span><br>
+ http://itman.narod.ru/index.htm - Информационный поиск и поиск по сходству]]></description>
        <author>Romtek</author>
        <category>Алгоритмы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=127806&amp;view=findpost&amp;p=969635</guid>
        <pubDate>Wed, 04 Jan 2006 16:22:23 +0000</pubDate>
        <title>Сравнить две строки</title>
        <link>https://forum.sources.ru/index.php?showtopic=127806&amp;view=findpost&amp;p=969635</link>
        <description><![CDATA[Mastilior: <div class='tag-quote'><a class='tag-quote-link' href='https://forum.sources.ru/index.php?showtopic=127806&view=findpost&p=969566'><span class='tag-quote-prefix'>Цитата</span></a> <span class='tag-quote__quote-info'>Profi &#064; <time class="tag-quote__quoted-time" datetime="2006-01-04T15:30:37+00:00">04.01.06, 15:30</time></span><div class='quote '>Суть алгоритма: находим похожие символы, смотрим, совпадают ли следующие символы (их количество зависит от MatchCount) и так далее. Потом выводим, сколько символов совпало, не совпало и процент совпадения.</div></div><br>
Угу, значит идет сравнение по символам... Тоже идея.<br>
<br>
<div class='tag-quote'><a class='tag-quote-link' href='https://forum.sources.ru/index.php?showtopic=127806&view=findpost&p=969567'><span class='tag-quote-prefix'>Цитата</span></a> <span class='tag-quote__quote-info'>nastenka &#064; <time class="tag-quote__quoted-time" datetime="2006-01-04T15:30:55+00:00">04.01.06, 15:30</time></span><div class='quote '>Mastilior, думаю, что в принципе твой подход правильный. только, наверное, сравнивать стоит не полные слова, а что-то типа корня (а может и большую часть). например, два предложения:</div></div><br>
<div class='tag-quote'><a class='tag-quote-link' href='https://forum.sources.ru/index.php?showtopic=127806&view=findpost&p=969574'><span class='tag-quote-prefix'>Цитата</span></a> <span class='tag-quote__quote-info'>Profi &#064; <time class="tag-quote__quoted-time" datetime="2006-01-04T15:36:12+00:00">04.01.06, 15:36</time></span><div class='quote '>На счет «на улице» и «на дворе». Здесь очень много может быть нюансов придется нехилый ИИ писать. Например: «На улице дождь» и «Дождь на дворе» - можно считать одним и тем же, но «Мой адрес – улица Авиамоторная» никак не сопрячь со двором.</div></div><br>
Да, конечно&#33; Но теперь эта необходимость отпадает, т. к. сранивается технический текст (комплектующие для компьютера), значит наличие корня не имеет большого значения.]]></description>
        <author>Mastilior</author>
        <category>Алгоритмы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=127806&amp;view=findpost&amp;p=969574</guid>
        <pubDate>Wed, 04 Jan 2006 15:36:12 +0000</pubDate>
        <title>Сравнить две строки</title>
        <link>https://forum.sources.ru/index.php?showtopic=127806&amp;view=findpost&amp;p=969574</link>
        <description><![CDATA[Profi: На счет «на улице» и «на дворе». Здесь очень много может быть нюансов придется нехилый ИИ писать. Например: «На улице дождь» и «Дождь на дворе» - можно считать одним и тем же, но «Мой адрес – улица Авиамоторная» никак не сопрячь со двором.]]></description>
        <author>Profi</author>
        <category>Алгоритмы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=127806&amp;view=findpost&amp;p=969567</guid>
        <pubDate>Wed, 04 Jan 2006 15:30:55 +0000</pubDate>
        <title>Сравнить две строки</title>
        <link>https://forum.sources.ru/index.php?showtopic=127806&amp;view=findpost&amp;p=969567</link>
        <description><![CDATA[nastenka: <strong class='tag-b'>Mastilior</strong>, думаю, что в принципе твой подход правильный. только, наверное, сравнивать стоит не полные слова, а что-то типа корня (а может и большую часть). например, два предложения:<br>
1. &quot;<em class='tag-i'>на улице</em> прекрасн<strong class='tag-b'>ая</strong> погод<strong class='tag-b'>а</strong>&quot;<br>
2. &quot;касательно погод<strong class='tag-b'>ы</strong> <em class='tag-i'>на дворе</em>, она сегодня выдалась прекрасн<strong class='tag-b'>ой</strong>&quot;<br>
т.е. мы однозначно видим, что предложения несут похожий смысл. можно и математически высчитать их схожесть <br>
какую же цель преследуем, сравнивая? например, задав поисковой машине как ключ &quot;прекрасная погода&quot;, я хотела бы видеть оба предложения. а сейчас еще разрабатывается новая система на основе семантики. это когда, например, поисковик будет понимать, что под понятиями &quot;на улице&quot; и &quot;на дворе&quot; подразумевается одно и то же.<br>
еще, я думаю, имеет смысл придавать отдельным частям предложения опреденеллым вес (коэффициент). т.е., как ты правильно заметил, как правило, многие слова (частички, предлоги, артикли (в иностранных языках) и т.п.) не имеют &quot;смыслового&quot; значения, а лишь являются связкой]]></description>
        <author>nastenka</author>
        <category>Алгоритмы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=127806&amp;view=findpost&amp;p=969566</guid>
        <pubDate>Wed, 04 Jan 2006 15:30:37 +0000</pubDate>
        <title>Сравнить две строки</title>
        <link>https://forum.sources.ru/index.php?showtopic=127806&amp;view=findpost&amp;p=969566</link>
        <description><![CDATA[Profi: Суть алгоритма: находим похожие символы, смотрим, совпадают ли следующие символы (их количество зависит от MatchCount) и так далее. Потом выводим, сколько символов совпало, не совпало и процент совпадения. <br><br>На счет вашего алгоритма: просто сверить слова – не верно. Например, Слон и слон, могут считаться разными словами (в приведенном мною алгоритме есть перевод всех букв в высокий регистр);  Слон и слону – тоже, но фразы «Слон покушал» и «Дали слону покушать» должны совпадать процентов на 50 как минимум.]]></description>
        <author>Profi</author>
        <category>Алгоритмы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=127806&amp;view=findpost&amp;p=969546</guid>
        <pubDate>Wed, 04 Jan 2006 15:09:00 +0000</pubDate>
        <title>Сравнить две строки</title>
        <link>https://forum.sources.ru/index.php?showtopic=127806&amp;view=findpost&amp;p=969546</link>
        <description><![CDATA[Mastilior: <strong class='tag-b'>nastenka</strong>, да, Насть, но что подразумевается под &quot;ключевыми словами&quot;? Даны просто две строки, которые нужно сравнить. Может, ключевые слова - это результат отсеивания ненужной информации? (Для предложений - это, например, предлоги, союзы...)<br>
<br>
Кстати, спасибо за ссылку - помнил, что есть еще один крупный ресурс, не мог вспомнить его названия ;)<br>
<br>
<strong class='tag-b'>Profi</strong>, спасибо&#33; А можно поинтересоваться, откуда это? И в чем заключается <strong class='tag-b'>суть</strong> алгоритма?<br>
<br>
До текущего момента я уже успел сделать свой алгоритм, который делит каждую строчку на отдельные слова и уже считает совпадения слов...  :rolleyes: Это верно?]]></description>
        <author>Mastilior</author>
        <category>Алгоритмы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=127806&amp;view=findpost&amp;p=969492</guid>
        <pubDate>Wed, 04 Jan 2006 13:54:50 +0000</pubDate>
        <title>Сравнить две строки</title>
        <link>https://forum.sources.ru/index.php?showtopic=127806&amp;view=findpost&amp;p=969492</link>
        <description><![CDATA[Profi: Покопался и нашел в нете. Слегка переделал (вернее дополнил).<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">function CompareStrings(S1, S2: string; MatchCount: integer;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;out NCount,Procent: integer):integer;</div><div class="code_line">var i, j, Count_, Count: integer;</div><div class="code_line">&nbsp;&nbsp; &nbsp;S1_, S2_: String;</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp;function Flag:Boolean;</div><div class="code_line">&nbsp;&nbsp;begin</div><div class="code_line">&nbsp;&nbsp; &nbsp;Result:= false;</div><div class="code_line">&nbsp;&nbsp; &nbsp;if (i + Count_ &#60;= Length(S1_))and(j + Count_ &#60;= Length(S2_)) then</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;if (AnsiUpperCase(S1_[i+Count_]) = AnsiUpperCase(S2_[j+Count_]))</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;{and(S1[j+Count_] &#60;&#62; &#39; &#39;)} then</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;Result:= true;</div><div class="code_line">&nbsp;&nbsp;end;</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp;Procedure ReplaceAllStr(var S:String; dS,pS:string);</div><div class="code_line">&nbsp;&nbsp;var</div><div class="code_line">&nbsp;&nbsp; &nbsp;i:integer;</div><div class="code_line">&nbsp;&nbsp;begin</div><div class="code_line">&nbsp;&nbsp; &nbsp;while pos(ds,s)&#60;&#62;0 do begin</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;i:=pos(ds,s);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;delete(s,i,length(ds));</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;insert(pS,S,i);</div><div class="code_line">&nbsp;&nbsp; &nbsp;end;</div><div class="code_line">&nbsp;&nbsp;end;</div><div class="code_line">&nbsp;</div><div class="code_line">begin</div><div class="code_line">&nbsp;&nbsp;Count:= 0;</div><div class="code_line">&nbsp;&nbsp;NCount:= 0;</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp;S1_:=S1;</div><div class="code_line">&nbsp;&nbsp;ReplaceAllStr(S1_, &#39; &#39;, &#39;&#39;);</div><div class="code_line">&nbsp;&nbsp;S2_:=S2;</div><div class="code_line">&nbsp;&nbsp;ReplaceAllStr(S2_, &#39; &#39;, &#39;&#39;);</div><div class="code_line">&nbsp;&nbsp;if (S1_ = &#39;&#39;)or(S2_ = &#39;&#39;) then</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;begin</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;Result:= 0;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;NCount:= 255;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;Exit;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;end;</div><div class="code_line">&nbsp;&nbsp;i:= 1;</div><div class="code_line">&nbsp;&nbsp;repeat</div><div class="code_line">&nbsp;&nbsp; &nbsp;j:= 1;</div><div class="code_line">&nbsp;&nbsp; &nbsp;repeat</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;if (AnsiUpperCase(S1_[i]) = AnsiUpperCase(S2_[j])){and(S1[i] &#60;&#62; &#39; &#39;)} then</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;begin</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Count_:= 1;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;while flag do</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Inc(Count_);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;i:= i + Count_ - 1;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;j:= j + Count_ - 1;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if Count_ &#62;= MatchCount then</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Count:= Count + Count_;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;end;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;inc(j)</div><div class="code_line">&nbsp;&nbsp; &nbsp;until j &#62;= Length(S2_);</div><div class="code_line">&nbsp;&nbsp; &nbsp;inc(i)</div><div class="code_line">&nbsp;&nbsp;until i &#62;= Length(S1_);</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp;if Length(S1_) &#60; Length(S2_) then</div><div class="code_line">&nbsp;&nbsp; &nbsp;Count_:= Length(S1_)</div><div class="code_line">&nbsp;&nbsp;else</div><div class="code_line">&nbsp;&nbsp; &nbsp;Count_:= Length(S2_);</div><div class="code_line">Result:= Count;</div><div class="code_line">NCount:= Count_ - Count;</div><div class="code_line">Procent:=round(result*100/(result+abs(nCount)));</div><div class="code_line">end;</div></ol></div></div></div></div><script>preloadCodeButtons('1');</script><br>
<br>
<span class="tag-color tag-color-named" data-value="gray" style="color: gray"><span class='tag-size' data-value='7' style='font-size:7pt;'>Добавлено <time class="tag-mergetime" datetime="2006-01-04T13:57:52+00:00">04.01.06, 13:57</time></span></span><br>
Кстати, в Delphi 2005 есть процедура CompareString, но я её не пробывал.]]></description>
        <author>Profi</author>
        <category>Алгоритмы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=127806&amp;view=findpost&amp;p=969467</guid>
        <pubDate>Wed, 04 Jan 2006 13:28:54 +0000</pubDate>
        <title>Сравнить две строки</title>
        <link>https://forum.sources.ru/index.php?showtopic=127806&amp;view=findpost&amp;p=969467</link>
        <description><![CDATA[nastenka: <strong class='tag-b'>Mastilior</strong>, контекстное сравнение - это ведь сравнение по ключевым словам? или я неправа? если все-таки это так, то в данном случае должны помочь алгоритмы для нечеткого поиска (какими пользуются, например, поисковые системы). здесь есть информация об алротимах с ссылками на другие источники. надеюсь, это чем-то поможет :)<br>
<a class='tag-url' href='http://algolist.manual.ru/search/fsearch/index.php' target='_blank'>algoLIST</a>]]></description>
        <author>nastenka</author>
        <category>Алгоритмы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=127806&amp;view=findpost&amp;p=969454</guid>
        <pubDate>Wed, 04 Jan 2006 13:15:14 +0000</pubDate>
        <title>Сравнить две строки</title>
        <link>https://forum.sources.ru/index.php?showtopic=127806&amp;view=findpost&amp;p=969454</link>
        <description><![CDATA[Profi: Самому нужен такой метод, тоже пока не реализовал.]]></description>
        <author>Profi</author>
        <category>Алгоритмы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=127806&amp;view=findpost&amp;p=968926</guid>
        <pubDate>Tue, 03 Jan 2006 20:33:24 +0000</pubDate>
        <title>Сравнить две строки</title>
        <link>https://forum.sources.ru/index.php?showtopic=127806&amp;view=findpost&amp;p=968926</link>
        <description><![CDATA[Mastilior: Всем привет&#33;<br><br>Где можно почитать подробнее о сабже? Искал в разделе &quot;Алгоритмы&quot;, Алглибе, Яндексе - мало чего нашел... :(<br>Задача состоит в том, чтобы сравнить две строки и возвратить степень их соответствия.<br><br>Вообще, в чем состоят основные принципы контекстного сравнения?<br><br>Заранее спасибо&#33; ;)]]></description>
        <author>Mastilior</author>
        <category>Алгоритмы</category>
      </item>
	
      </channel>
      </rss>
	