Tilakkumar / cleartk

Automatically exported from code.google.com/p/cleartk
0 stars 0 forks source link

handling null outcomes #88

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I am working on the MalletDataWriter and I want an exception to be thrown
if for some reason it is given an Instance that has no outcome.  I could do
this in MalletDataWriter's write method.  But maybe
DataWriter_ImplBase.write method should be doing this instead.  Or maybe
the DataWriterAnnotator.consume method should.  Any thoughts?  I think the
DataWriterAnnotator.consume method should throw the exception.  After all,
it has a method expectsOutcomes that returns true.  If we say it expects
outcomes, then it should probably throw an exception if it doesn't get
outcomes.  

Original issue reported on code.google.com by pvogren@gmail.com on 22 Apr 2009 at 4:52

GoogleCodeExporter commented 8 years ago
I wouldn't make it a hard requirement to always provide an outcome when using a 
data writer. In some cases, 
including unlabeled examples will be an important feature (I believe there are 
classifiers that can use them to 
generalize better, but I haven't really looked into the specifics).

But I do agree that it makes sense for a data writer that can't handle 
unlabeled examples to throw an exception.

Original comment by phwetz...@gmail.com on 22 Apr 2009 at 5:17

GoogleCodeExporter commented 8 years ago
I agree with Philipp that the data writer should throw the exception.  That's 
what it does now.  So, this issue can be closed.

Original comment by pvogren@gmail.com on 1 Dec 2010 at 6:46