Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

corefoo-nlp

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

corefoo-nlp

In general, the intent-tree contains two types of nodes: * Structure Nodes - Who, On, In * Content Nodes - Bob, Wednesday, London

  • 0.1.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
14
decreased by-36.36%
Maintainers
1
Weekly downloads
 
Created
Source

In general, the intent-tree contains two types of nodes:

  • Structure Nodes - Who, On, In
  • Content Nodes - Bob, Wednesday, London

Generally, when a sentence is modelled as a tree, structure and content alternate.

   Content: "I"
      Structure: "saw"
         Content: "Bob"
            Structure: "on"
               Content: "Wednesday"

A quick thought on ambigus sentence - which turn out to be good modelling examples.

We might look at the sentence:

I saw a man on a hill with a telescope.

You might be surprised to learn that there are four reasonable interpretations of this sentence - and at least one unreasonable one. We could say, a computer can't deal with ambiguity. But, its ambigous for everyone - not just a computer. In this case, an NLP system should detect the ambiguity and seek clarification - just as we would.

The five, variations would be modelled as:

  1. There’s a man on a hill, and I’m watching him with a telescope.
   C: "I"
      S: "saw" (with my eyes)
         C: "a man"
            S: "on"
               C: "a hill"
         S: "with"
            C: "a telescope"

The 'seeing' is being done with a telescope, so "with a telescope" is below "saw".

  1. There’s a man on a hill, who I’m seeing, and he has a telescope.
   C: "I"
      S: "saw" (with my eyes)
         C: "a man"
            S: "on"
               C: "a hill"
            S: "with"
               C: "a telescope"

Now the man has the telescope, so "with a telescope" is below "a man".

  1. There’s a man, and he’s on a hill that also has a telescope on it.
   C: "I"
      S: "saw" (with my eyes)
         C: "a man"
            S: "on"
               C: "a hill"
                  S: "with"
                     C: "a telescope"

Now the hill has a telescope, so it sits below "a hill"

  1. I’m on a hill, and I saw a man using a telescope.
   C: "I"
      S: "on"
         C: "a hill"
      S: "saw" (with my eyes - guessed where this is going yet?)
         C: "a man"
            S: "with"
               C: "a telescope"

The phrase "on a hill" now belongs to "I". It could, arguably belong to "saw" if it was key that the 'seeing' was done on the hill.

  1. There’s a man on a hill, and I’m sawing him with a telescope.
   C: "I"
      S: "saw" (as if to cut in half)
         S: "with"
            C: "a telescope"
         C: "a man"
            S: "on"
               C: "a hill"

This is the same structure as 1. but now the man is in danger! The difference would be in the semantic meaning given to the verb "saw".

"Who is processing incoming-orders today?"

   C: "Who"
      S: "Is processing"
         C: "incoming-orders"
         S: timescale
            C: "today"

You could argue that 'today' belongs to 'incoming orders' because we are talking about today's orders. But really its a timescale of the allocation - thus it sits below 'is processing'. If the phrase was shortened to 'who is processing today' - 'today' obviously belongs to 'processing'.

This becomes important if the incoming orders are from yesterday: "Who is processing yesterday's incoming-orders today?"

   C: "Who"
      S: "Is processing"
         C: "incoming orders"
            S: timescale
               C: "Yesterday"
         S: timescale
            S: "Today"

FAQs

Package last updated on 15 May 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc