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.

1. WhatQuery

The match pattern:

  1. Index 0 → Position: DET
  2. Index 1 → Position: NOUN
  3. Index 2 → Position: AUX, optional
  4. Index 3 → Position: ADV
  5. Index 4 → Position: PUNCT, optional

Example matches:

Token transformation:

  1. command: NOUN

2. WhoQuery

The match pattern:

  1. Index 0 → Position: PRON
  2. Index 1 → Position: AUX
  3. Index 2 → Position: PRON

Example matches:

Token transformation:

None

3. AuxiliaryQuery

Example matches:

  1. Index 0 → Position: NOUN
  2. Index 1 → Position: ADV, optional
  3. Index 2 → Position: AUX
  4. Index 3 → Position: PUNCT, optional

Example matches:

Token transformation:

  1. command: NOUN

4. CommandQuery

Pattern 1

Example matches:

  1. Index 0 → Position: VERB
  2. Index 1 → Position: PRON, optional
  3. Index 2 → Position: DET, optional
  4. Index 3 → Position: ADJ, optional
  5. Index 4 → Position: NOUN

Example matches:

Pattern 2

Example matches:

  1. Index 0 → Position: VERB
  2. Index 1 → Position: PRON, optional
  3. Index 2 → Position: DET, optional
  4. Index 3 → Position: ADJ, optional
  5. Index 4 → Position: PROPN

Example matches:

Token transformation:

  1. target: NOUN or PROPN

Revision #2
Created 5 January 2025 05:56:02 by Ahmad
Updated 5 January 2025 06:57:13 by Ahmad