Is it possible to find the repeating patterns in the TEXT stored in MySQL? -
is possible find repeating patterns in text?
my table looks this:
create table `textanalysis` ( `id` int(11) not null auto_increment, `abstract` text, unique key `id` (`id`), fulltext key `abstract` (`abstract`) ) engine=myisam auto_increment=2 default charset=latin1;
i find words or group of words in text make statistics.
here tricks (not optimized)
use "apple" example,
length apple 5
select (length(abstract)-length(replace(lower(abstract), 'apple', '')))/5 occurrences textanalysis match (abstract) against ('+apple' in boolean mode);
what replace apple (make length of abstract shorter),
, compare original length deduce number of occurrences.
Comments
Post a Comment