The modules given above (and some others in the Lingua:: namespace as well) will give you the similarity in terms of 'raw words', but that's it. Attempting to derive meaning - 'the same information, told multiple ways' - is another matter altogether, as evidenced by the fact that your two example sentences do *not* say the same thing...in one, the fox jumps over the dogs while in the other, it's the dogs who are jumping.
Something like Lingua::LinkParser could help you here. POS analysis would allow you to spot the similarities between "The fox jumped over the dog" and "The dog was jumped over by the fox". More work than simple text matching, but better for reducing the eventual size of the database.
Cheers, Ben.
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|