Hi,
I'm trying to remove non-stop words from a text file using regular expresions but it is not working. I used something like ('^[a-z]?or') in order to avoid removing (or) from the mibble of words e.g. morning.
Temp = []
Original_File = open('out.txt', 'r')
Original_File_Content = Original_File.read()
Original_File.close()
Temp.append("".join(Original_File_Content))
FileString = "".join(Temp)
p = re.compile( "^[a-z]?is|^[a-z]?or|^[a-z]?in")
RemoveWords = p.sub( '', FileString)
Thanks