Aw: Counting the number of repeated phrases in a column - Mailing list pgsql-general

From Karsten Hilbert
Subject Aw: Counting the number of repeated phrases in a column
Date
Msg-id trinity-3fcabd90-bbd0-4ea8-862c-289cc034845f-1643131326254@3c-app-gmx-bs05
Whole thread Raw
In response to Counting the number of repeated phrases in a column  (Shaozhong SHI <shishaozhong@gmail.com>)
Responses Re: Counting the number of repeated phrases in a column
List pgsql-general
> There is a short of a function in the standard Postgres to do the following:
>  
> it is easy to count the number of occurrence of words, but it is rather difficult to count the number of occurrence
ofphrases. 
>  
> For instance:
>  
> A cell of value:  'Hello World' means 1 occurrence a phrase.
>  
> A cell of value: 'Hello World World Hello' means no occurrence of any repeated phrase.
>  
> But, A cell of value: 'Hello World World Hello Hello World' means 2 occurrences of 'Hello World'.
>  
> 'The City of London, London' also has no occurrences of any repeated phrase.
>  
> Anyone has got such a function to check out the number of occurrence of any repeated phrases?

For that to become answerable you may want to define what to
do when facing ambiguity.

Best,
Karsten



pgsql-general by date:

Previous
From: Shaozhong SHI
Date:
Subject: Counting the number of repeated phrases in a column
Next
From: Shaozhong SHI
Date:
Subject: Re: Counting the number of repeated phrases in a column