wow that's impressive. how did you get started and what do you aim to accomplish ultimately?
I am aware of what my end-goals are but I'm just unsure of how to get there so after some research I've read python is a good place to get started given the tools into the direction I'd like to head.
i find the learning curve of the layout of the language pretty easy now that it's running semi-properly. i'm still having some issues but I'm sure I'll be able to work them out in due time.
for example after doing some sentdex exercises I've run into an error like this:
CODE:
import nltk
from nltk.corpus import state_union
from nltk.tokenize import PunktSentenceTokenizer
train_text = state_union.raw("2005-GWBush.txt")
sample_text = state_union.raw("2006-GWBush.txt")
custom_sent_tokenizer = PunktSentenceTokenizer(train_text)
tokenized = custom_sent_tokenizer.tokenize(sample_text)
def process_content():
try:
for i in tokenized:
words = nltk.word_tokenize(i)
tagged = tagged.pos_tag(words)
print(tagged)
except Exception as e:
print(str(e))
process_content()
Error:
DEBUG:
local variable 'tagged' referenced before assignment
and i've read that I maybe need to put a "return" in somewhere but I just don't know where and I've read that maybe a "global" somewhere would help but it could mess the code up in longer iterations.
then when I put the coding into the terminal to run it I get numerous syntax, unexpected indent errors, etc. so, working in visual studio code is getting me more experience for now but it's just frustrating when I can't replicate semi-simple tasks as I'm seeing others do when I've duplicated the code line-by-line.
alas, patience and experience.
EDIT: i'm unsure of why the indentations are edited out and they're all uniform but I assure you they are indented properly and if you can tell me how to maintain paragraph continuity when pasting code, that'd be super helpful for future questions. I used the BBCode accidentally on my first post and was rightfully issued a warning; i just want to abide by the rules of the forum and it's not my intention to break them. ignorance is no excuse, I'm just learning as I go with what I've read from helpful people who have posted links within this very thread.
thanks again.