ShortcutNLP

Natural Language Processor for Shortcuts


Description

Process text input and receive various decompositions of your input into parts of speech, varied tense, negation, etc. You can also create patterns to tag matching phrases.

Part of the Intelligent Tools Collection

Pattern Matching

Learn more about pattern matching

Example Pattern Matching Shortcut

{
    "text": "umm, do you know how I should sign-in to my Routinehub account?",
    "Patterns": {
        "LoginIssues": [
            "how do? i (can|should)? (log|sign|get) in to my? #Software",
            "i can't (log|sign|get) in to my? #Software",
            "#Software won't let me (log|sign|get) in"
        ]
    },
    "Words": {
        "Software": [
            "Shortcuts",
            "iOS",
            "Routinehub"
        ]
    }
}

Language Analysis

Example Usage Shortcut

Input:

{
  "text": "The quick brown fox jumps over the lazy dog."
}

Output:

{
    "Normalized": "The quick brown fox jumps over the lazy dog.",
    "Named Entities": [],
    "People": [],
    "Nouns": [
        {
            "text": " fox",
            "normal": "fox",
            "article": "a",
            "main": "fox",
            "qualifier": "",
            "singular": "fox",
            "plural": "foxes"
        },
        {
            "text": " dog.",
            "normal": "dog",
            "article": "a",
            "main": "dog",
            "qualifier": "",
            "singular": "dog.",
            "plural": "dogs"
        }
    ],
    "Verbs": [
        {
            "text": " jumps",
            "normal": "jumps",
            "parts": {
                "negative": "",
                "auxiliary": "",
                "verb": "jumps",
                "particle": "",
                "adverbs": ""
            },
            "interpret": {
                "negative": false,
                "continuous": false,
                "passive": false,
                "perfect": true,
                "plural": false,
                "modal": null,
                "tense": "Present"
            },
            "conjugations": {
                "PastTense": "jumped",
                "PresentTense": "jumps",
                "Infinitive": "jump",
                "Gerund": "jumping",
                "Actor": "jumper",
                "FutureTense": "will jump"
            }
        }
    ],
    "Verb Conjugation": [
        {
            "PastTense": "jumped",
            "PresentTense": "jumps",
            "Infinitive": "jump",
            "Gerund": "jumping",
            "Actor": "jumper",
            "FutureTense": "will jump"
        }
    ],
    "Present Tense": [
        {
            "text": "The quick brown fox jumps over the lazy dog.",
            "normal": "the quick brown fox jumps over the lazy dog"
        }
    ],
    "Past Tense": [
        {
            "text": "The quick brown fox jumped over the lazy dog.",
            "normal": "the quick brown fox jumped over the lazy dog"
        }
    ],
    "Future Tense": [
        {
            "text": "The quick brown fox will jump over the lazy dog.",
            "normal": "the quick brown fox will jump over the lazy dog"
        }
    ],
    "Negative Verbs": [
        {
            "text": " does not jump",
            "normal": "does not jump"
        }
    ],
    "Negative": [
        {
            "text": "The quick brown fox does not jump over the lazy dog.",
            "normal": "the quick brown fox does not jump over the lazy dog"
        }
    ],
    "Contractions Expanded": [],
    "Tags": [
        {
            "text": "The",
            "normal": "the",
            "tags": [
                "TitleCase",
                "Determiner"
            ]
        },
        {
            "text": "quick",
            "normal": "quick",
            "tags": [
                "Comparable",
                "Adjective"
            ]
        },
        {
            "text": "brown",
            "normal": "brown",
            "tags": [
                "Comparable",
                "Adjective"
            ]
        },
        {
            "text": "fox",
            "normal": "fox",
            "tags": [
                "Noun",
                "Singular"
            ]
        },
        {
            "text": "jumps",
            "normal": "jumps",
            "tags": [
                "PresentTense",
                "Verb",
                "VerbPhrase"
            ]
        },
        {
            "text": "over",
            "normal": "over",
            "tags": [
                "Adjective"
            ]
        },
        {
            "text": "the",
            "normal": "the",
            "tags": [
                "Determiner"
            ]
        },
        {
            "text": "lazy",
            "normal": "lazy",
            "tags": [
                "Adjective"
            ]
        },
        {
            "text": "dog.",
            "normal": "dog",
            "tags": [
                "Noun",
                "Singular"
            ]
        }
    ]
}

Dependency Badge

This shortcut was made with ShortcutNLP!

[![This shortcut was made with ShortcutNLP!](http://magaimg.net/img/8kdf.png)](https://routinehub.co/shortcut/3260)

Credits

Based on / utilizing the NLP library Compromise

This shortcut was compiled with Trail Blazer! This shortcut was built with Run Javascript
Supports This shortcut supports Swing Updater!

Latest Release Notes

1.0.9 - July 30, 2019, 4:35 a.m.

Pattern Matching now returns an array of matches where before it returned only the first match.


Version history