Skip to content

Commit d43d890

Browse files
committed
fix
1 parent 7df475a commit d43d890

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

src/SyntaxTree/ConllXParserFactory.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,16 @@ public static function create($csv, $delimiter = "\t", $enclosure = '"', $escape
2323
{
2424
if (!$string)
2525
{
26-
$sentences[] = $array;
26+
if ($array)
27+
{
28+
$sentences[] = $array;
29+
}
2730
$array = [];
2831
continue;
2932
}
3033
$string = str_replace('"', '\\"', $string);
3134
$array[] = str_getcsv($string, $delimiter, $enclosure, $escape);
3235
}
33-
if ($array)
34-
{
35-
$sentences[] = $array;
36-
}
3736

3837
return static::createTrees($sentences);
3938
}

src/SyntaxTree/Node.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,6 @@ public function toArray()
4242
foreach ($this->children as $item)
4343
{
4444
$children[] = $item->toArray();
45-
// $children[] = [
46-
// 'number' => $item->getNumber(),
47-
// 'text' => $item->getText(),
48-
// 'children' => $children,
49-
// ];
5045
}
5146

5247
$array = [

0 commit comments

Comments
 (0)