File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -39,18 +39,13 @@ var questionModule = function() {
3939 callback ( false ) ;
4040 } else {
4141 for ( i = 0 ; i < data . response . entities . length ; i ++ ) {
42- //entityPositions.push([data.response.entities[i].matchedText, data.response.entities[i].startingPos, data.response.entities[i].endingPos]);
43- //<input answer=‘“ + theAnswer + ”’ class='form-control' type='text’>
44- sentence = sentence . substring ( 0 , data . response . entities [ i ] . startingPos ) + "<input answer=‘" + sentence . substring ( data . response . entities [ i ] . startingPos ) ;
45- sentence = sentence . substring ( 0 , data . response . entities [ i ] . endingPos ) + "’ class='form-control' type='text’>" + sentence . substring ( data . response . entities [ i ] . endingPos ) ;
42+ entityPositions . push ( [ data . response . entities [ i ] . matchedText , data . response . entities [ i ] . startingPos , data . response . entities [ i ] . endingPos ] ) ;
4643 }
47- console . log ( "SENTENCE = " + sentence ) ;
48- callback ( sentence ) ;
49- //output = [entityPositions, sentence];
44+ output = [ entityPositions , sentence ] ;
5045
51- // output2 = JSON.stringify(output);
46+ output2 = JSON . stringify ( output ) ;
5247
53- // callback(output2);
48+ callback ( output2 ) ;
5449 }
5550 }
5651} ;
You can’t perform that action at this time.
0 commit comments