NLP Parser
NLP Parser parses the text into token model. Token model is a model that contains the structure of the text. Parser classifies these model into several queries.
Query and Transformation
Query is a set pattern that will parse token model. The matches result will be transformed into command model. The command model properties are as following.
-
command
- The command that will tell Execution Router -
target
- The target of execution -
related_tokens
- The tokens that are related to the target. For example, incurrent date
,current
is related tokens -
type
- The type of command -
source
- It can be an input for the target for execution
1. WhatQuery
The match pattern:
- Index 0 → Position:
DET
- Index 1 → Position:
NOUN
- Index 2 → Position:
AUX
, optional - Index 3 → Position:
ADV
- Index 4 → Position:
PUNCT
, optional
Example matches:
- What time is it now?
- What time is now?
- What time now?
Token transformation:
-
command
:NOUN
2. WhoQuery
The match pattern:
- Index 0 → Position:
PRON
- Index 1 → Position:
AUX
- Index 2 → Position:
PRON
Example matches:
- Who are you?
- Who is that?
Token transformation:
None
3. AuxiliaryQuery
Example matches:
- Index 0 → Position:
NOUN
- Index 1 → Position:
ADV
, optional - Index 2 → Position:
AUX
- Index 3 → Position:
PUNCT
, optional
Example matches:
- Current time is?
Token transformation:
-
command
:NOUN
4. CommandQuery
Pattern 1
Example matches:
- Index 0 → Position:
VERB
- Index 1 → Position:
PRON
, optional - Index 2 → Position:
DET
, optional - Index 3 → Position:
ADJ
, optional - Index 4 → Position:
NOUN
Example matches:
- Show me directory media
Pattern 2
Example matches:
- Index 0 → Position:
VERB
- Index 1 → Position:
PRON
, optional - Index 2 → Position:
DET
, optional - Index 3 → Position:
ADJ
, optional - Index 4 → Position:
PROPN
Example matches:
- Show me running containers
Token transformation:
-
target
:NOUN
orPROPN
No Comments