-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Description
when I tried to launch the code
import tkseem as tk
import csv
# initialize the tokenizer
tokenizer = tk.WordTokenizer()
tokenizer.train('data.txt')
# open the csv file and read the text data
with open('../uploads/tweets-ar.csv', mode='r', encoding='utf-8') as csv_file:
csv_reader = csv.reader(csv_file)
for row in csv_reader:
text = row[0]
# tokenize the text using tkseem
tokens = tokenizer.tokenize(text)
print(tokens)i got this error
File "pathtomycode\tokenize.py", line 5, in <module>
tokenizer = tk.WordTokenizer()
AttributeError: partially initialized module 'tkseem' has no attribute 'WordTokenizer' (most likely due to a circular import)Metadata
Metadata
Assignees
Labels
No labels