I had a database of paragraph document. I want to split each sentence in the paragraph on table "master_data" and store it into different table "splittext".
master_data table :
id | Title | Paragraph
splittext table
id_sen | sentences | doc_id
I tried using this query to select every sentences in Paragraph.master_data
SELECT Paragraph FROM pyproject.master_data where REGEXP_SUBSTR '[^\.\!\*
[\.\!\?]';
But it yields bracket error. So i tried using brackets, and yield error Incorrect Parameter Count
SELECT Paragraph FROM pyproject.master_data where REGEXP_SUBSTR '([^\.\!\*
[\.\!\?])';
My expected result is that the paragraph got splitted into sentences and stored to new table. And return the original id of the paragraph and stored into doc_id.
As example :
master_data :
id | Title | Paragraph |
1 | asds..| I want. Some. Coconut and Banana !! |
2 | wad...| Milkshake? some Nice milk. |
splittext_table :
id| sentences | doc_id |
1| I want | 1 |
2| Some | 1 |
.
.
.
5| Some Nice milk | 2 |