Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- select *
- from text_exp
- where regexp_like(text, '(.+)([^.!?])121')
- select distinct x.*,
- regexp_substr(lower(text), '(w+?)s+(S*s)*?1', level) sub, level
- from ezhus.text_exp x
- connect by regexp_substr(lower(text), '(w+?)s+(S*s)*?1', level) is not null
- AND PRIOR TEXT = TEXT
- AND PRIOR dbms_random.value IS NOT NULL
- select distinct x.*,
- regexp_substr(lower(text), '[^[:alpha:]]([a-zа-я]+)[, :;]+.*1[, :;]+.*1[, :;]*.*', level) sub,
- level
- from ezhus.text_exp x
- connect by regexp_substr(lower(text), '[^[:alpha:]]([a-zа-я]+)[, :;]+1[, :;]+1[, :;]*', level) is not null
- AND PRIOR TEXT = TEXT
- AND PRIOR dbms_random.value IS NOT NULL
- with TEXTs(TEXT) as(
- select 'text abc gef text nm. text this is test abc this abc.' from DUAL
- union all
- select 'this is row two of the test text, word "text" is double.' from DUAL
- )
- select ID, pnum, word, p
- from (
- select ID, p, pnum, regexp_substr(p, 'w+', 1, level) word
- from (
- select ID, regexp_substr(text, '.*?(.|$)', 1, level) p, level as pnum
- from (select lower(text) as text, rownum as ID from TEXTs) x
- connect by regexp_substr(text, '.*?(.|$)', 1, level) is not null
- and PRIOR ID=ID and prior dbms_random.value is not null
- )
- connect by PRIOR ID=ID and PRIOR pnum=pnum and prior dbms_random.value is not null
- and regexp_substr(p, 'w+', 1, level) is not null
- )
- group by ID, p, pnum, word
- having count(1)>1
- ID PNUM WORD P
- 1 1 text text abc gef text nm.
- 1 2 abc text this is test abc this abc.
- 1 2 this text this is test abc this abc.
- 2 1 is this is row two of the test text, word "text" is double.
- 2 1 text this is row two of the test text, word "text" is double.
- select x.*,
- regexp_count(lower(text),
- '[^[:alpha:]]([a-zа-я]+)[, :;]+[^!.?]*1[, :;]+[^!.?]*1')cnt,
- regexp_count(lower(text),
- '^([a-zа-я]+)[, :;]+[^!.?]*1[, :;]+[^!.?]*1[^[:alpha:]]')cnt1
- from ezhus.text_exp x
- where regexp_count(lower(text),
- '[^[:alpha:]]([a-zа-я]+)[, :;]+[^!.?]*1[, :;]+[^!.?]*1') >= 1
- OR regexp_count(lower(text),
- '^([a-zа-я]+)[, :;]+[^!.?]*1[, :;]+[^!.?]*1[^[:alpha:]]') >= 1
- select x.*
- from ezhus.text_exp x
- where regexp_like(regexp_replace(lower(text),
- '^([0-9a-zа-я]+)[, :;]+[^!.?]*1[, :;]+[^!.?]*1', ' '||text),
- '[^[0-9a-zа-я]]*([0-9a-zа-я]+)[, :;]+[^!.?]*1[, :;]+[^!.?]*1')
Add Comment
Please, Sign In to add comment