View Full Version : putting an nlp algorithm into code

01-27-2012, 09:36 PM
This is what I need to do. I downloaded nltk, I want to access all the files. I came up with a few mathematical formulas I want to be put into code.

I want the code to analyze the text that nltk has with this formula.

i = (r)n*y
p = ((i...)*y)
a = ((...i)*y)
u = p + i + a

rawinput == i
for all u containing i, find most probable u (r + 1)
print most probable u.

i = item
r = # of response (# of sentence)
n = variable for any symbol
y = variable for any positive integer including 0
p = presumption
a = assumption
u = unit of knowledge

the ...'s stand for "preceding" and "followed by"

I need to implement this code in python.