-
Notifications
You must be signed in to change notification settings - Fork 0
/
csvhandler.py
30 lines (21 loc) · 879 Bytes
/
csvhandler.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import pandas
from pandas import read_csv ,read_excel ,read_json ,read_pickle ,read_sql
import os
import re
#imported from file
from naturalprocessingwordnet import getlengthofarray,getline
from naturalprocessingwordnet import getsortedsynonyms,getsynonyms,getsysets,gettempwords
from onlyfilereadwrite import searchwordinposfile, searchwordinnegfile
print ("\n","#"*50,"\n","HI IT'S STARTING OF CSV HANDLER SCRIPT","\n","#"*50)
print("temp words->")
print (gettempwords())
def exactmatch(filename,word):
line = filename.readline()
line = line.split()
for w in line:
if w == word:
print ("Fully Matched Word","\n")
def posfilematching(word):
for i in range(0,getlengthofarray(word)):
exactmatch("list of positive words.txt",gettempwords()[i])
print (bool(searchwordinposfile("acumen","list of positive words.txt")))