Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

debug and output of morphtagger go on the same stream if -out is set to /dev/stdout #6

Open
GoogleCodeExporter opened this issue Mar 18, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?

1. Input (see attached file):
1   Michael Michael Michael NE  NE  _   _   _   _   _   _   _   _   _
2   war sein    sein    VAFIN   VAFIN   _   _   _   _   _   _   _   _   _
3   ein eine    eine    ART ART _   _   _   _   _   _   _   _   _
4   guter   gut gut ADJA    ADJA    _   _   _   _   _   _   _   _   _
5   Junge   Junge   Junge   NN  NN  _   _   _   _   _   _   _   _   _
6   .   .   .   $.  $.  _   _   _   _   _   _   _   _   _


2. Command for testing:
java -Xmx2G -cp anna-3.3.jar is2.mtag.Tagger -model 
tiger-complete.anna-3-1.morphtagger.model -test /dev/stdin -out /dev/stdout 

3. Current output (see attached file):
45.20.675  is2.data.ParametersFloat 121:read ->        read parameters 
134217727 not zero 4044229
45.20.677  is2.data.Cluster 113:<init> ->              Read cluster with 0 
words 
45.20.678  is2.mtag.Tagger 148:readModel ->            Loading data finished. 
45.20.679  is2.mtag.Tagger 150:readModel ->            number of parameter 
134217727
45.20.679  is2.mtag.Tagger 151:readModel ->            number of classes   268
Processing Sentence: 
1   Michael Michael Michael NE  NE  _   case=nom|number=sg|gender=masc  -1  -1  _   _   _   _
2   war sein    sein    VAFIN   VAFIN   _   number=sg|person=3|tense=past|mood=ind  -1  -1  _   _   _
    _
3   ein eine    eine    ART ART _   case=nom|number=sg|gender=masc  -1  -1  _   _   _   _
4   guter   gut gut ADJA    ADJA    _   case=nom|number=sg|gender=masc|degree=pos   -1  -1  _   _   
_   _
5   Junge   Junge   Junge   NN  NN  _   case=nom|number=sg|gender=masc  -1  -1  _   _   _   _
6   .   .   .   $.  $.  _   _   -1  -1  _   _   _   _

2 0.0095 seconds/sentnece 
Used time 0.019 seconds 

What is the expected output? What do you see instead?

In the latest change of DB.java, the debug variable was switched on by default. 
But since all debug info gets printed to the same stream as processed strings, 
this output can't later be fed into parser via a pipe. Would it be possible to 
switch the debug off, or, even better, to print the debug info  to System.err, 
so that it could be separated from the rest in cases when -out is set to 
/dev/stdout. It's of course possible to fiddle with file descriptors, but 
nevertheless sending debug to System.err would probably be nicer.

What version of the product are you using? On what operating system?
anna-3.3.jar
tiger-complete.anna-3-1.morphtagger.model

OS: Linux 3.4.47-2.38-desktop x86_64

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 4 Sep 2013 at 7:40

Attachments:

@GoogleCodeExporter
Copy link
Author

Never thought on a use like this. Yes, I changed this. The idea was to have 
files only because it takes some time to load the models. 
Thx. 
Bernd

Original comment by [email protected] on 5 Sep 2013 at 2:59

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant