"; +// if(allIndexes.length > 0){ +// var startIndex = 0; +// for(let j=0; j < allIndexes.length; j++){ +// var part1 = wordResultKWIC[i-1].slice(startIndex,allIndexes[j]) +// var part2 = wordResultKWIC[i-1].slice(allIndexes[j], allIndexes[j] + selWord.length) +// startIndex = allIndexes[j] + selWord.length +// ulcontent = ulcontent + part1 + "" + part2 + ""; +// } +// if(startIndex < wordResultKWIC[i-1].length){ +// ulcontent = ulcontent + wordResultKWIC[i-1].slice(startIndex, wordResultKWIC[i-1].length) +// } +// ulcontent += "
"+i+"" + ""; +// ulControl.append(ulcontent); +// } +// } +// +//} -function findByTag(selWord, tag, rowResult){ +function findByTag(selWord, tag, rowResult, wordResultKWIC){ /* selWord: selected word rowResult: sentences tag: POS + */ $("#tagInput1").attr("value",tag); var ulControl = $('#sentencesGroup'); ulControl.find("li").remove(); - var rowResult1 = rowResult; - if(rowResult1.length > 0){ + if(wordResultKWIC.length > 0){ $('#labelId1').show(); $('#clusterDiv1').show(); } - for(i=1; i" + part1 + "" + part2 + "" + part3 + "
" + - ""+i+""+ - ""; - ulControl.append(ulcontent); + + outstr = '' + for(i=1; i' + ulControl.append(outstr); } diff --git a/src/templates/cluster.html b/src/templates/cluster.html index 0f3679d..6b79bf9 100644 --- a/src/templates/cluster.html +++ b/src/templates/cluster.html @@ -35,8 +35,6 @@' } + outstr += '