Modifying a MAIN-CLASS.java file to make an application run continuously

I have an executable .jar file that runs on Windows command line and does the following: the user types in "java -jar Uqailaut.jar" and then a word in the Inuit language Inuktitut, for example "java -jar Uqailaut.jar kiluutaq" and presses enter.  The program then outputs an analysis (i.e. parse) of that word in terms of its different morphological components; the resulting output for "kiluutaq" is:
{kilu:kiluaq/1v}{utaq:ut/1vn}
{kilu:kiluk/1v}{utaq:ut/1vn}
Where the two lines represent two possible decompositions of the word.  I would like to analyze all the words in an entire 50,000 word+ corpus using this program, but obviously I can't be doing it one word at a time!  So my question is, how can I get the program to run automatically over a large text file, and preferably output a text file.  I have attached the MAIN-CLASS.java file to this question.  Thanks for your help and suggestions!
Decompose.java
MarkMcAndrewsAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

CEHJCommented:
You shouldn't need to modify it. In a Unix OS, you could just do

java Decompose $(cat word-file)

Open in new window


You should be able to do the same thing at the Windows command line, but i'm not sure of the syntax. You could try

java Decompose (type word-file)

Open in new window


If that doesn't work, then add the DOS topic area to this question
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
MarkMcAndrewsAuthor Commented:
Dear CEHJ, thanks so much for your help.  In GIT BASH I entered

$ java -jar Uqailaut.jar $(cat file.txt)

And the program indeed read from the txt file!  It also worked for .csv files, but not .doc files (which is fine).  The problem is that it only analyzes/outputs the last word in the .txt or .csv file and ignores earlier words.  If I had to guess it would be that the program is only set up to output one word at a time (I'm not sure about that though - maybe there is something with the formatting of the input file where it can't read multiple words?).  Would it be possible to give every word in the corpus its own file then have the program open each file individually?  I'm not sure which direction to go at this point.  But I am further ahead than I was before!
0
CEHJCommented:
Might be to do with line feeds. Try

java -jar Uqailaut.jar $(tr '\r\n,' ' ' <file.txt)

Open in new window

0
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

MarkMcAndrewsAuthor Commented:
I ran that line of code and got the same result.
0
CEHJCommented:
Can you put the jar somewhere i can test it?
0
MarkMcAndrewsAuthor Commented:
Update: I wrote a script that looped through all the files in a directory.  Your expertise on how to get the program to read from a file was exactly what I needed.  Thank you!!
0
CEHJCommented:
Update: I wrote a script that looped through all the files in a directory.  
That of course wouldn't have changed the problem you referred to
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java

From novice to tech pro — start learning today.