Commits

Anonymous committed bd3fa92

[RDFaCE-Lite] fixed a bug related to Extractiv

  • Participants
  • Parent commits 27009f3
  • Branches RDFaCE-Lite

Comments (0)

Files changed (2)

RDFaCE-Lite/tinymce/examples/rdface_lite.html

 		<!-- Gets replaced with TinyMCE, remember HTML in a textarea should be encoded -->
 		<div>
 			<textarea id="elm1" name="elm1" rows="15" cols="80" style="width: 80%">
-<p><span style="font-family: arial,helvetica,sans-serif; font-size: small;">The foundation of the <strong>University of Leipzig</strong> in 1409 initiated the city's development into a centre of German law and the publishing industry. The philosopher and mathematician Gottfried Leibniz was born in Leipzig in 1646, and attended the university from 1661&ndash;1666.</span></p>
+<p><strong>Johann Wolfgang von Goethe</strong> was a German writer, pictorial artist, biologist, theoretical physicist, and polymath. He is considered the supreme genius of modern German literature. His works span the fields of poetry, drama, prose, philosophy, and science.<br />Goethe studied law in <span style="color: #993300;">Univeristy of Leipzig</span> from 1765 to 1768. He detested learning age-old judicial rules by heart, preferring instead to attend the poetry lessons of Christian F&uuml;rchtegott Gellert. In Leipzig, Goethe fell in love with K&auml;thchen Sch&ouml;nkopf and wrote cheerful verses about her in the Rococo genre.<img style="float: right;" src="http://upload.wikimedia.org/wikipedia/commons/thumb/0/0e/Goethe_%28Stieler_1828%29.jpg/220px-Goethe_%28Stieler_1828%29.jpg" height="189" width="154" /><br />The restaurant Auerbachs Keller and its legend of Faust's 1525 barrel ride impressed him so much that Auerbachs Keller became the only real place in his closet drama Faust Part One. Because his studies did not progress, Goethe was forced to return to Frankfurt at the close of August 1768. Goethe had a great effect on the nineteenth century.<br />The Goethe Institute is a non-profit German cultural association operational worldwide, promoting the study of the German language abroad and encouraging international cultural exchange and relations. The Goethe-Institut fosters knowledge about Germany by providing information on German culture, society and politics.</p>
 			</textarea>
 		</div>
 		<br />

RDFaCE-Lite/tinymce/jscripts/tiny_mce/plugins/rdface/js/util/functions.js

 	case "organization":
 	case "ORGANIZATION":
 	case "CRIMINAL_ORGANIZATION":
+	case "EDUCATIONAL_ORG":
 	case "ENTERTAINMENT_ORG":
 	case "GOVERNMENT_ORG":
 	case "MEDIA_ORG":
 	// this step must be done manually for each NLP API
 	$.each(dataReceived['entities'], function(key, val) {
 		var entity = new Array();
-		var positions=new Array();
 		var properties=new Array();
 		// separate desired entities
 		if((val['type']=="PERSON")|| (val['type']=="CITY")|| (val['type']=="COUNTRY")|| (val['type'].split("_")[1]=="ORG")|| (val['type'].split("_")[1]=="ORGANIZATION")){
 					labels.push(val['text']);
 					entity["type"]=val['type'];
 					entity["label"]=val['text'];
-					//positions["start"]=val['offset'];
-					//positions["end"]=val['offset']+val['len']-1;
+					//entity["start"]=val['offset'];
+					//entity["end"]=val['offset']+val['len']-1;
 					entity["uri"]='';
 					if(val['links']){
 						entity["uri"]=val['links'][0];
 					// add a property
 					properties.push(Array("name",val['text']));
 					//Extractiv only returns positions by text content so ignores html content
-					entity["positions"]=positions;
 					entity["properties"]=properties;
 					entitiesComplete.push(entity);	
 					if(excludeFlag){