Revision: 17787
http://sourceforge.net/p/gate/code/17787
Author: ian_roberts
Date: 2014-04-09 16:08:26 +0000 (Wed, 09 Apr 2014)
Log Message:
-----------
Added support for a "reason" for gold-standard classification units.
Modified Paths:
--------------
gate/trunk/plugins/Crowd_Sourcing/src/gate/crowdsource/rest/CrowdFlowerClient.java
Modified:
gate/trunk/plugins/Crowd_Sourcing/src/gate/crowdsource/rest/CrowdFlowerClient.java
===================================================================
---
gate/trunk/plugins/Crowd_Sourcing/src/gate/crowdsource/rest/CrowdFlowerClient.java
2014-04-09 14:54:57 UTC (rev 17786)
+++
gate/trunk/plugins/Crowd_Sourcing/src/gate/crowdsource/rest/CrowdFlowerClient.java
2014-04-09 16:08:26 UTC (rev 17787)
@@ -201,8 +201,12 @@
}
}
String correctAnswer = (String)target.getFeatures().get("correct");
+ String reason = (String)target.getFeatures().get("reason");
if(correctAnswer != null) {
formDataSize += 4; // "golden" + answer
+ if(reason != null) {
+ formDataSize += 2; // answer_gold_reason
+ }
}
String[] formData = new String[formDataSize];
@@ -237,6 +241,10 @@
formData[i++] = "true";
formData[i++] = "unit[data][answer_gold]";
formData[i++] = correctAnswer;
+ if(reason != null) {
+ formData[i++] = "unit[data][answer_gold_reason]";
+ formData[i++] = reason;
+ }
}
try {
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Put Bad Developers to Shame
Dominate Development with Jenkins Continuous Integration
Continuously Automate Build, Test & Deployment
Start a new project now. Try Jenkins in the cloud.
http://p.sf.net/sfu/13600_Cloudbees
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs