Skip to content

Commit

Permalink
add TIME token type, see issue #873
Browse files Browse the repository at this point in the history
  • Loading branch information
grandsbor committed Jul 7, 2020
1 parent e033ae2 commit 5c71f7f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/lib_annot.php
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,8 @@ private function _from_token($token, $force_unknown, $force_include_init, $restr
$this->parses[] = new MorphParse($token, array(array('inner' => 'PNCT')));
} elseif (preg_match('/^\p{Nd}+[\.,]?\p{Nd}*$/u', $token)) {
$this->parses[] = new MorphParse($token, array(array('inner' => 'NUMB')));
} elseif (preg_match('/^([01][0-9]|2[0-3]):[0-5][0-9](:[0-5][0-9])?$/u', $token)) {
$this->parses[] = new MorphParse($token, array(array('inner' => 'TIME')));
} elseif (preg_match('/^[\p{Latin}\.-]+$/u', $token)) {
$this->parses[] = new MorphParse($token, array(array('inner' => 'LATN')));
} elseif (preg_match('/^\p{S}+$/u', $token)) {
Expand Down

0 comments on commit 5c71f7f

Please sign in to comment.