Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent af84901 commit 3a59150Copy full SHA for 3a59150
python-read-docx/read_docx.py
@@ -0,0 +1,19 @@
1
+import docx
2
+
3
+#Extract text from DOCX
4
+def getDocxContent(filename):
5
+ doc = docx.Document(filename)
6
+ fullText = ""
7
+ for para in doc.paragraphs:
8
+ fullText += para.text
9
+ return fullText
10
11
+resume = getDocxContent("sample.docx")
12
13
+#Importing NLTK for sentence tokenizing
14
+from nltk.tokenize import sent_tokenize
15
16
+sentences = sent_tokenize(resume)
17
+for sentence in sentences:
18
+ print(sentence)
19
+ print("\n")
python-read-docx/readme.rst
@@ -0,0 +1 @@
+You can read tutorial https://www.roytuts.com/read-word-file-using-python/
0 commit comments