How to drive lights with a text file

Hi, im doing an installation and i need it reconize some words in text files and each of this word turn on and off some lights.
I know I have to control arduino from another programming language like processing or puredata but i didnt find information about how this programs can read a text file.
I meant, I have a word documents wich is a list of words. I need the program reconize this and can generate and output for each word. For Example, making a lenguage in wich each letter corresponds to a number.

pd: sorry if my english is not very good (and my drafting and my programming knowledge)

thanks!

The Arduino can read words from a text file on an SD card.

Does a specific word always trigger the same pattern of lights?

How many different words are there?

How fast do you want the lights to change? The Arduino could probably go through the text file at over 1000 words per second.

For Example, making a lenguage in wich each letter corresponds to a number.

Each letter already corresponds to a number. It's called ASCII. You can look up the ascii value for any letter on an ascii table.

You mentioned "Word document", which I take to mean Microsoft Word. You're not going to get an Arduino to read that. You will want to use a plain text file, aka ascii file. How do you intend to "feed" the file to the Arduino? SD card?