concordia search php
This commit is contained in:
parent
714a9f2f0c
commit
8cb806d47b
@ -32,12 +32,12 @@ $data = json_decode($response);
|
||||
<pre><?php print_r($data);?></pre>
|
||||
<div id="result-score">Concordia score: <b><?= round($data->result->bestOverlayScore*100) ?>%</b></div>
|
||||
<?php
|
||||
/*
|
||||
|
||||
$inputSentence = $_GET["pattern"];
|
||||
$markedSentence = "";
|
||||
$fragments = array();
|
||||
$lastInsertedEnd = 0;
|
||||
for($i=0; $i<length($data->result->bestOverlay);$i++) {
|
||||
for($i=0; $i<count($data->result->bestOverlay);$i++) {
|
||||
$fragment = data->result->bestOverlay[i];
|
||||
//previous unmarked fragment
|
||||
$markedSentence += substr($inputSentence,$lastInsertedEnd, $fragment->matchedPatternStart - $lastInsertedEnd);
|
||||
@ -52,7 +52,7 @@ $data = json_decode($response);
|
||||
}
|
||||
//remaining unmarked fragment
|
||||
$markedSentence += substr($inputSentence, $lastInsertedEnd);
|
||||
*/
|
||||
|
||||
?>
|
||||
<div id="result-sentence" onMouseUp="phraseSearch(this)"><?=$markedSentence ?></div>
|
||||
<br/><br/><br/>
|
||||
|
Loading…
Reference in New Issue
Block a user