tamingtext / book

Taming Text Book Source Code
http://www.tamingtext.com
380 stars 207 forks source link

Frankenstein run error #7

Closed lotterblad closed 11 years ago

lotterblad commented 11 years ago

Hi,

I've downloaded source code and received the following error on attempting to run the frankenstein.sh script.

Initializing Frankenstein
Exception in thread "main" java.io.FileNotFoundException: ../../opennlp-models
  at com.tamingtext.frankenstein.Frankenstein.init(Frankenstein.java:226)
  at com.tamingtext.frankenstein.Frankenstein.main(Frankenstein.java:72)

1) opennlp-models is located in the TT_HOME folder and was downloaded as instructed 2) I'd look myself and see what problem is at lines 76 and 226 but I can't seem to find the frankenstein.java file (just the compiled .class file)

Really looking forward to the digging into the book and thanks in advance for your help.

gsingers commented 11 years ago

Can you provide the full set of steps you used to run this? What directory you were in? How you compiled, etc?

-Grant

On Jan 21, 2013, at 7:09 PM, Luke wrote:

Hi,

I've downloaded source code and received the following error on attempting to run the frankenstein.sh script.

Initializing Frankenstein Exception in thread "main" java.io.FileNotFoundException: ../../opennlp-models at com.tamingtext.frankenstein.Frankenstein.init(Frankenstein.java:226) at com.tamingtext.frankenstein.Frankenstein.main(Frankenstein.java:72) 1) opennlp-models is located in the TT_HOME folder and was downloaded as instructed 2) I'd look myself and see what problem is at lines 76 and 226 but I can't seem to find the frankenstein.java file (just the compiled .class file)

Really looking forward to the digging into the book and thanks in advance for your help.

— Reply to this email directly or view it on GitHub.


Grant Ingersoll http://www.lucidworks.com

lotterblad commented 11 years ago

Sure,

On ubuntu I created a directory called TT_HOME and unpacked the > src, data, etc. into that directory as instructed. I downloaded the opennlp and wordnet folders as instructed and placed them in TT_HOME > opennlp-models, Wordnet-3.0.

I ran "mvn package" using maven 3.0.4.. Build installed without error.

Also I downloaded the "pg84.txt" and moved the inlclued "frankenstein.txt" into the TT_HOME folder (as I wasn't sure how the file was referenced in the program).

Then I executed sudo bin/frankenstein.sh, while in the TT_HOME folder. There was an initial error in the script pointing to the wrong java directory on my machine and I fixed that. Then I ran again recieving the aforementioned error.

I moved both files into the "TT_HOME/data" folder thinking that the java file might need files to be located in that directory. I ran sudo bin/frankenstein.sh: same error. Then i went looking for the com.tamingtext.frankenstein ".java" file so I could inspect the parts of the code to see if I was missing something else. It wasn't included (at least not where the other .java files are). So, that's where I'm stuck. If you could post the frankenstein.java file I could probably figure this out myself.

Again really looking forward to the book, as I've been working on bits and pieces of QA technology (classification, natural language processing, search) but don't have a clear idea of how they can all be put together into a production.

Regards, Luke

gsingers commented 11 years ago

On Jan 22, 2013, at 10:50 AM, Luke wrote:

Sure,

On ubuntu I created a directory called TT_HOME and unpacked the > src, data, etc.

Does this mean you got the tarball from Manning? If so, perhaps we have an error in packaging. Can you trying cloning from Github?

into that directory as instructed. I downloaded the opennlp and wordnet folders as instructed and placed them in TT_HOME > opennlp, wordnet-3.0.

I ran "mvn package" using maven 3.0.4.. Build installed without error.

Also I downloaded the "pg84.txt" and moved the inlclued "frankenstein.txt" into the TT_HOME folder (as I wasn't sure how the file was referenced in the program).

Then I executed sudo bin/frankenstein.sh, while in the TT_HOME folder. There was an initial error in the script pointing to the wrong java directory on my machine and I fixed that. Then I ran again recieving the aforementioned error.

I moved both files into the "TT_HOME/data" folder thinking that the java file might need files to be located in that directory. I ran sudo bin/frankenstein.sh: same error. Then i went looking for the com.tamingtext.frankenstein ".java" file so I could inspect the parts of the code to see if I was missing something else. It wasn't included (at least not where the other .java files are). So, that's where I'm stuck. If you could post the frankstein.java file I could probably figure this out myself.

It's at: https://github.com/tamingtext/book/blob/master/src/test/java/com/tamingtext/frankenstein/Frankenstein.java

Try doing a "mvn test" first, as that should build it.

Again really looking forward to the book, as I've been working on bits and pieces of QA technology (classification, natural language processing, search) but don't have a clear idea of how they can all be put together into a production.

Regards, Luke

— Reply to this email directly or view it on GitHub.


Grant Ingersoll http://www.lucidworks.com

lotterblad commented 11 years ago

Fixed: The file Structure should go (and does when checked out from github): TT_HOME > book> src, data, etc. I had somehow not included the "book" dir when I just copied it to the TT_HOME directory from zip.

Thanks for the help.