Add separator function to convert to words

This commit is contained in:
Sambo Chea 2021-03-26 09:28:47 +07:00
parent 007eefe0e1
commit 28e15042a8
3 changed files with 10 additions and 0 deletions

View File

@ -1,2 +1,5 @@
# sentences-separator-to-words # sentences-separator-to-words
From sentences to words by separate the word processing and delegate them into array From sentences to words by separate the word processing and delegate them into array
- Text processing unit
- Split the words from sentences

5
src/main.py Normal file
View File

@ -0,0 +1,5 @@
from separator import convertToWords
sentences = ["Welcome to CUBETIQ Solution"]
print(convertToWords(sentences))

2
src/separator.py Normal file
View File

@ -0,0 +1,2 @@
def convertToWords(sentences):
return (sentences[0].split())