...
...
Operates On: Lexical Items with TOKEN and possibly other flags as specified below.
Info |
---|
Currently handles the following situations: - Integers: 0, 1, 100
- Floats: 0.5, 12.2, 3.14159 (.)
- Negative: -1003, -12.2
|
...
- Thousands with/without separator: 1000000, 1,000,000 (,)
- Numbers with
|
...
- scientific notation: 1.1x10^-8, 1.1x10-8, 1.1x10^8, -1.1x108, 1.1E±11, -1.1E±11
- Romans numerals: MMC, XII, IV
- English ordinal numbers: 1st, 12th, 23rd
- Exponents: 4^9, 4^-9, 49, 4-9
- Fractions: 4/9, 131/13
|
Warning |
---|
|
Exponent recognition is not working at the moment. |
Note |
---|
Does NOT currently recognize: |
...
- Computer literals: 0xBEA1, 07832
- European numbers with commas and periods swapped
- Positive: +102.3
|
Operates On: Lexical Items with TOKEN
Configuration
Code Block |
---|
language | js |
---|
theme | Eclipse |
---|
title | Example Configuration |
---|
|
{
"type":"NumberRecognizer"
} |
Flags
Lex-Item Flags:
- NUMBER - Flagged on all tokens which are numbers according to the rules above.
Vertex Flags:
None.
Include Page |
---|
| Generic Configuration Parameters |
---|
| Generic Configuration Parameters |
---|
|
Configuration Parameters
Parameter |
---|
summary | Enable recognition of scientific notation |
---|
default | false |
---|
name | scientificNotation |
---|
type | boolean |
---|
|
Parameter |
---|
summary | Enable ordinal number recognition |
---|
default | false |
---|
name | ordinals |
---|
type | boolean |
---|
|
Parameter |
---|
summary | Enable Roman numeral recognition |
---|
default | false |
---|
name | romans |
---|
type | boolean |
---|
|
Parameter |
---|
summary | Choose ordinal language |
---|
default | en |
---|
name | ordinalsLang |
---|
|
- . Currently supports
- English: "en"
- Spanish: "es"
Code Block |
---|
|
"scientificNotation": false,
"ordinals": true,
"romans": false,
"ordinalsLang": "en" |
Example Output
...
...
|
V----------[1984 42 -10 3.14 ]-----------V
^--[1984]--V--[42]--V--[-10]--V--[3.14]--^
|
...
^----[#]---V---[#]--V---[#]---V----[#]---^ |
Output Flags
Lex-Item Flags:
- NUMBER - Flagged on all tokens that are numbers according to the rules above.
- SEMANTIC_TAG - Identifies all lexical items that are semantic tags.
Vertex Flags:
Info |
---|
No vertices are created in this stage |