Skip to content

A NLP based system that can interface with a ‘smart’ refrigerator. It allows users to ask text queries or instructions to their fridge and get response appropriately.

License

Notifications You must be signed in to change notification settings

Veera93/nlp-smart-fridge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Smart Refrigerator

INTRODUCTION

This project aims at developing a natural language understanding system that can interface with a ‘smart’ refrigerator and allow users to text queries or instructions to their fridge. If the message is a declarative sentence, the fridge agrees or disagrees according to its contents. If the message is a question, the fridge answers, according to its contents. This can be achieved by developing a First-Order Logic based natural language understanding system that can create exact semantic representations for complex linguistic input, and respond appropriately.

Modules

The below diagram describes the various modules involved in the project and gives a brief description of what each module does.

Flow chart

PARSER:

For this project, we have made use of Shift Reduce parser. This being a chat application we have assumed that the query length would be short and hence the time taken to parse will not be exponential. In the future, active/passive chart parser can be used for better performance.

To convert the input sentence to FOL we had to form our grammar which consists of a list lemmas, lexical items and phrasal rules.

We have handled avoiding listing all inflections for all words by identifying the stem of each token and tagging the word appropriately. In the current version at times we might not get the expected parsed output at the first lookup but the parser will eventually return the expected FOL representation.

Table

MODEL CHECKER:

The model created for this project is described below,

Model

The SAT module takes the model and the pasered input and returns the satisfiability. We have modified the sat to deal with numerals, currently model works for two and we can extend it to satisfy any numerals.

Response

Depending of the type of the input sentence and the output of model checker we respond to the user,

  1. If the input is a true declarative sentence, we output “That is correct”.
  2. If the input is a false declarative sentence, we output “That is not correct”.
  3. If the input is a yes-no question, then according to the output of the model checker we output yes. or No.
  4. If the input is a content question, then according to the output of the model checker. The output will consist of all the properties P that the object in the answer set has, according to the model.

Technology Stack

  1. SWI-Prolog
  2. Swish.swi-prolog.org
  3. Sublime text

Example Run

Output

About

A NLP based system that can interface with a ‘smart’ refrigerator. It allows users to ask text queries or instructions to their fridge and get response appropriately.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages