fozziethebeat / S-Space

The S-Space repsitory, from the AIrhead-Research group
GNU General Public License v2.0
205 stars 106 forks source link

Generic Main should fail fast on converting options to enums. #18

Closed fozziethebeat closed 12 years ago

fozziethebeat commented 12 years ago

Running

java -Xmx2g -cp target/sspace-2.0.3-jar-with-dependencies.jar edu.ucla.sspace.mains.LSAMain -d test.doc -o dense_text .

processes the corpus using SVD and then attempts to convert the value of -o (dense_text) to a edu.ucla.sspace.common.SemanticSpaceIO.SSpaceFormat enum after the processing only to fail, since it's an incorrect value. This should fail before any processing to save time and computational resources.

davidjurgens commented 12 years ago

Is this just missing the toUpperCase() to match the enum's .valueOf() casing?

On Thu, Jul 26, 2012 at 1:36 AM, Keith Stevens < reply@reply.github.com

wrote:

Running

java -Xmx2g -cp target/sspace-2.0.3-jar-with-dependencies.jar

edu.ucla.sspace.mains.LSAMain -d test.doc -o dense_text .

processes the corpus using SVD and then attempts to convert the value of -o (dense_text) to a edu.ucla.sspace.common.SemanticSpaceIO.SSpaceFormat enum after the processing only to fail, since it's an incorrect value. This should fail before any processing to save time and computational resources.


Reply to this email directly or view it on GitHub: https://github.com/fozziethebeat/S-Space/issues/18

fozziethebeat commented 12 years ago

Nope, DENSE_TEXT isn't a valid option, TEXT is. Either way, it should fail fast.

fozziethebeat commented 12 years ago

Commit bcd5b9f8f8a9c23c8d8ac6c165ff0f1994807aea fixes this issue.