Vijay:

You're quickly passing my familiarity with the J2EE work, so I'm not sure what you mean by "descritor,input and out put in webroot". Do you mean you've actually placed the XML from the descriptor into the web.xml file? If that's the case, I don't think that'll work. I would place the the Analysis Engine descriptor into the same directory as that ExampleApplication.java code (the classes folder maybe). That way the class can get at the descriptor without having to worry about resource mappings and paths. I'm not really sure what's going on other that that, but the error message you're getting ("com.ibm.uima.util.InvalidXMLException".invalid descriptor file at"c://tomcat/descriptor/webanalysis.xml") tells me that there's something wrong with the descriptor. Look in 'uimaj-examples/src/main/descriptors/analysis_engine' and compare any of those valid descriptors to the one you're trying to load (webanalysis.xml).


-Matt


vijay vijay wrote:
Hi Matthew,

                     how are u? actually i thought u will reply to my
posting, i have one really big thing which is made me to stop.i have put
that across Adam now,similar posting i am sending it for u i hope u will
solve my problem.

                 as Adam said i have downloded the xalan.jar and adde it as
an external jar.it is working .it is is giving output  in console like this
 @@Processing file inpit.txt
uima.tcas.DocumentAnnotation
"vijay,michale,uima,who are these?"
sofa = uima.cas.Sofa
sofaNum = 1
sofaID = "_InitialView"
mimeType = "text"
sofaArray = null
sofaString = "vijay,michale,uima,who are these?"
sofaURI = null
begin = 0
end = 33
language = "x-unspecified"
com.iton.uima.TestType
"who"
sofa = uima.cas.Sofa                                 //here i have passed
vijay,michale,uima as conigaration parameter but it does't read?
sofaNum = 1                                            //why it happend like
this? here i got "who" this came from where we mention the name of the
sofaID = "_InitialView"                              //class in
webanalysis.xml...
mimeType = "text"
sofaArray = null
sofaString = "vijay,michale,uima,who are these?"
sofaURI = null
begin = 19
end = 22
TestType = "who"@@    And main problem is i am not getting in IEBrowser i
have given it as like thishttp://localhost:8000//UIMAWeb/servlet/Test
here i got error saying "com.ibm.uima.util.InvalidXMLException".invalid
descriptor file at"c://tomcat/descriptor/webanalysis.xml".i have tried in
google but didn't get relevent ones.

if u want to use this as web application wht are thing we have to do
i will explain u what i have done tell me wether it is wright wya or
not........

in servlt i have put "example application" as main class,descritor,input and
out put in webroot,then i have deployed it in tomact.i got the above error.

i hope u will get it what iam asking for.........
i have 2 problems here 1)is regarding configarationparameter.2) how to write
in web application


vijay





On 9/14/07, Matthew Campbell <[EMAIL PROTECTED]> wrote:
Vijay:

   "System.err.println()" only displays that message in the console
telling you how to run the java application.  Usage statements are
common in Java console programs, since they tell you how to use a new
program and what arguments should be passed to it when you don't invoke
it correctly.  It looks like you have the right *idea*, but you don't
put those directories into the System.err call (that would just print
them out on the console with the message) - you pass them on the command
line.  In Eclipse, you can pass them by clicking Run >> Open Run Dialog,
making sure the ExampleApplication is selected as your main class, and
adding the three paths (the analysis engine descriptor, input directory,
and output directory) to the Program Arguments box in the Arguments
tab.  Make sure to surround each argument/directory with double-quotes
if they have spaces in them (it doesn't appear so in your example code
here).
   As for the error about missing ")", you've sort of butchered the
quotation marks in that System.err call.  Eclipse should be syntax
highlighting that for you, so you should be able to work out when the
string is closed with the correct quotation mark and when it isn't.  I
would just change it back to the way it was though and save yourself
some time.
   These aren't really UIMA errors, though, but fundamental Java ones,
so I don't know if this is really the place to discuss them (Sun's Java
forums may be better suited to some of the general Java questions).
Walk through the code of the ExampleApplication starting from the main()
method.  If there are things you don't understand or are giving you
errors when you run it, do a quick google search to see if other folks
have had the same problem.  Make a decent effort to debug on your own,
and then come back if you're up against a wall.

   Sidestepping to your question about regular expressions, their used
to match patterns in strings, and I'm sure you'll find them very useful
both inside and outside of UIMA.  I find the website
http://www.regular-expressions.info/ very helpful when reading up on the
subject, but again, Google is your friend.


-Matt

vijay vijay wrote:
Hi adam,


              at last i found the java class,so i just added that class
to
my project wrote as a java
 class,there i am getting an lke this

 Usage: java com.ibm.uima.example.ExampleApplication <TAE descriptor or
TEAR
file name> <input dir> <output dir>""

actually i have tried this when i am doing my first example i got the
same
error .now i have given here like this


System.*err*.println("Usage: java
com.ibm.uima.example.ExampleApplication "+
"<AnalysisEngine.xml> +
<D:"\"eclipse\vijay\workspace\exampleApplication\input>
<D:"\"eclipse\vijay\workspace\exampleApplication\output>")
i am getting an error like this

"Syntax error, insert ")" to complete MethodInvocation".
i have tried not my best.

AND my aim also develop full fleged compnent to search for unstructured
data,my people want to use this as search tool in their project.this one
is
ultimate goal.

i don't how far i am going to suceed in this but i want give my best
with ur
support.......

vijay


On 9/13/07, Adam Lally <[EMAIL PROTECTED]> wrote:



On 9/13/07, vijay vijay <[EMAIL PROTECTED]> wrote:

Hi  Adam Lally ,

                           as per ur code below i have tried


analysisEngine.setConfigParameterValue("StringsToAnnotate",
 new String[] {"Michael","UIMA","Vijay",....}); but it is
giving anerror like analysisEngine cannot be resolved. i am attching
the
class what i wrote.


Vijay,

The setConfigParameterValue call does not go in the annotator.  It
goes in your main program.  The idea is that the main program sets the
configuration parameter values before calling the annotator.  It
wouldn't make any sense for the annotator code to set its own
configuration parameter values, then it might as well just hardcode
the values it was searching for!

Did you look at ExampleApplication.java yet?  You asked how to write a
Main program, and you were on the right track with that.  In
ExampleApplication.java's main method you have this line of code:

       AnalysisEngine ae = UIMAFramework.produceAnalysisEngine
(specifier);
And you would put after it:

ae.setConfigParameterValue("StringsToAnnotate", new String[]
{"Michael","UIMA","Vijay"});

Regards,
-Adam



Reply via email to