"INDEX,FOLLOW,ALL"),
array('title'=>"Unique Content Creation by OneTIPP.COM!"),
array('onetipp_original'=>$text),
array('onetipp_results'=>$text),
array('onetipp_debug'=>"$output - OneTIPP Version: $mod_date"),
array('description'=>"Kopiere einen Text und erstelle vollautomatisch einen neuen Text - Leistungsschutzkonform und Urheberrechtlich sicher!")
);
$design->setPath("/home/www/www.onetipp.com/tpl-new");
$design->display('startpage_new', $content, true, false);
exit;
}
$result_pos = $pos->tag(explode(' ', $text));
$result_ner = $ner->tag(explode(' ', $text)); // German Model: I-PER, I-LOC, I-ORG, I-MISC
/*
//echo "POS ARRAY: " . count($result_pos). " und NER ARRAY: ". count($result_ner);
//print_r($result_pos);
echo "
POS: ";
echo sizeof($result_pos);
print_r($result_pos);
echo "
NER: ";
echo sizeof($result_ner);
print_r($result_ner);
// array merge:
*/
//print_r($result_pos);
//print_r($result_ner);
$arrMerger = array();
$iterator = new RecursiveIteratorIterator(new RecursiveArrayIterator($result_pos));
$c=0;
foreach ($iterator as $key => $value){
// echo "WortPOS: $key :".$result_pos[0][$c][0]." => ".$result_pos[0][$c][1]."
";
// echo "WortNER: $c => ".$result_ner[0][$c][0]." ==> ".$result_ner[0][$c][1]."
";
$posWord = $result_pos[0][$c][0];
$nerWord = $result_ner[0][$c][0];
$posValue = $result_pos[0][$c][1];
$nerValue = $result_ner[0][$c][1];
//echo "$i)=WortPOS: " . var_dump($result_pos[$key]) . "
";
//echo "$i)=WortNER: " . var_dump($result_ner[$key]) . "
";
// echo "WortPOS: " . $result_pos[$key][0] ." -> ". $result_pos[$key][1] . "
";
// echo "WortNER: " . $result_ner[$key][0] ." -> ". $result_ner[$key][1] . "
";
//if (ctype_alnum($posWord) && strcasecmp($posWord, $nerWord) == 0){
$a = array(
"word"=>$posWord,
"pos"=>$posValue,
"ner"=>$nerValue,
);
array_push($arrMerger, $a);
//}
$c++;
}
var_dump($arrMerger);
$content = array_merge(
array('robots'=>"INDEX,FOLLOW,ALL"),
array('title'=>"Unique Content Creation by OneTIPP.COM!"),
array('onetipp_original'=>$text),
array('onetipp_results'=>$text),
array('onetipp_debug'=>"$output - OneTIPP Version: $mod_date"),
array('description'=>"Kopiere einen Text und erstelle vollautomatisch einen neuen Text - Leistungsschutzkonform und Urheberrechtlich sicher!")
);
$design->setPath("/home/www/www.onetipp.com/tpl-new");
$design->display('startpage_new', $content, true, false);
//echo $design->display_cache('startpage_new', $content, false, false, 3600*24*3);
/*
Ablauf:
POS Taggen
NER Taggen
POS UND NER TAG IN EINE GEMEINSAME ARRAY STRUKTUR BRINGEN, Zb
array("word=Haus", "POS=NN", "NER=O")
Spell Check mit ASPELL
wenn Wort länger als gleich 4 zeichen hat,
wenn NER Taggen
NICHT "LOCATION"
oder
NICHT "ORGANIZATION"
oder
NICHT "PERSON"
UND EINSCHLIESSLICH:
POS Taggen
TAG GLEICH "NOMEN" oder "Verb" oder "Adjektiv" oder "Adverb"
=> hier auchnochmal im Python code gucken, was modifiziert werden darf
Nach dem Spell Check, UniLeiptizg nutzen:
Synonme austauschen, wenn
wenn NER Taggen
NICHT "LOCATION"
oder
NICHT "ORGANIZATION"
oder
NICHT "PERSON"
UND EINSCHLIESSLICH:
POS Taggen
TAG GLEICH "NOMEN" oder "Verb" oder "Adjektiv" oder "Adverb"
Dann Translation CALL Machen
dann rück und ausgabe
Dann mit Zeitstempel ein und ausgabe daten in Mongodb speichern
Später:
Autorenprofil
setJavaPath('C:/Program Files/Java/jdk1.7.0_45/bin');
$result = $pos->tag(explode(' ', " $text"));
var_dump($result);
$previousValue="";
$previousType="";
$FullName="";
$i=0;
foreach ($result as $eType) {
echo $i." ".$FullName."";
$i++;
if(!(strcmp($eType[1], 'PERSON')))
{
if(!(strcmp($previousType, 'PERSON')) && !(strcmp($FullName, "")))
{
$FullName=$previousValue." ".$eType[0];
}
else if(!(strcmp($previousType, 'PERSON')) && (strcmp($FullName, "")))
{
$FullName=$FullName." ".$eType[0];
}
else if(!(strcmp($a, "Answer not found")) && !(strcmp($FullName, "")))
$FullName=$eType[0];
else if((strcmp($FullName, "")))
$FullName=$FullName." or ".$eType[0];
}
$previousValue=$eType[0];
$previousType=$eType[1];
}
echo $FullName;
*/
exit(0);