テキストを解析したい。B R I E F I N G S I N B I O I N F O R M A T I C S
途中で飛ばしたいみたいな変な文が出てきた。ここにコードがあります
<?php
$text = 'B R I E F I N G S I N B I O I N F O R M A T I C S. Because many biomedical entities have multiple names and abbreviations, it would be advantageous to have an automated means to collect these synonyms and abbreviations to aid users doing literature searches.';
$reg = '/(?<=[.!?]|[.!?][\'"])\s+/';
foreach(preg_split($reg, $text, -1, PREG_SPLIT_NO_EMPTY) as $sentence){
foreach(preg_split('/\s+/', $sentence) as $words){
if (count(strlen($words)>1)){
//I don't know what to do
}
}
}
?>
しかし、それはまだ間違っていB R I E F I N G S I N B I O I N F O R M A T I C S
ます。ありがとうございました