GithubHelp home page GithubHelp logo

deancording / node-red-contrib-ecolect Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 0.0 30 KB

A Node Red node that is a wrapper around the Ecolet natural language matching library.

License: MIT License

HTML 74.37% JavaScript 25.63%
node-red

node-red-contrib-ecolect's People

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

node-red-contrib-ecolect's Issues

When String Parameter, Only String Comes in Values

If I add this combination

Parameters

  • {item} - Enumeration (movie, show)
  • {title} - text

Phrases

  • add {item} {title}

Test
add movie matrix

Output
{"_msgid":"141e6565.c596eb","topic":"teste","payload":"add movie matrix","values":{"title":"matrix"},"score":0.9663333333333334}

Nodes:
[{"id":"b68711d0.483b7","type":"ecolect","z":"4a34442b.6fc19c","name":"","topics":[{"name":"teste","phrases":"add {item} {title}","values":[{"name":"item","type":"enumeration","enumerations":["movie","show"]},{"name":"title","type":"text","enumerations":[]}]}],"outputs":2,"x":400,"y":680,"wires":[["bc36adc.508d95"],["9db3f260.7a73e"]]},{"id":"a67cdd8d.756ce","type":"inject","z":"4a34442b.6fc19c","name":"","topic":"","payload":"add movie matrix","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":200,"y":680,"wires":[["b68711d0.483b7"]]},{"id":"bc36adc.508d95","type":"debug","z":"4a34442b.6fc19c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":590,"y":620,"wires":[]},{"id":"9db3f260.7a73e","type":"debug","z":"4a34442b.6fc19c","name":"ERRO","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":590,"y":740,"wires":[]}]

Thank You

Can i change language ?

I've seen you user english so i've tried to change it to french

I copied and pasted the language en to another folder and change it into french but i've always the same error
[node-red-contrib-ecolect/ecolect] SyntaxError: Unexpected token {

So what can I do ?

Using non-english phrases

Hey Dean,

me again :-)

What I really like about this node, is the fact that it can extract dates/numbers/times... from a phrase. For example some available possibilities for time:

image

However I'm speaking Dutch at home, so I would like my Ecolect node to understand my weird native language. For example instead of 'activate kitchen light in two days and four hours', I would like to interpret 'activeer keuken licht in twee dagen en vier uren'.

I see in your code that you already added some locale related stuff:

const en = require('ecolect/language/en');
const any = require('ecolect/values/any');

Am I right that following steps need to be executed to accomplish my goal ??

  1. I have to implement a series of Dutch locale files, similar to the english files.
  2. I need to create a pull request for the ecolect project, to add the new locale files
  3. Does the node-red-contrib-collect config screen needs to be extended with a dropdown (that automatically displays all the available locales) or does the any statement in your code run through all the available locales ?
  4. I assume your package.json file doesn't need to be updated for the new ecolect dependency, since you use the '*' version.

Thanks !
Bart

Nedds updating.

Hello,
I tred to use it but since there is a new version of ecolect 6.0, and nodered node (node-red-contrib-ecolect) is designed for a previous one, the system halts when I try to use it. It reports some missing files and when I manually copy them from previous version zip it reports some other missing etc and this behaviour never ends.

23 Mar 13:50:13 - [warn] [node-red-contrib-ecolect/ecolect] Error: Cannot find module 'ecolect/values/index' (line:21)
Do you know a solution to the problem?
Thanks in advance,

Stam

missing module 'ecolect/values/index' (line:21)

Hello, I have been trying to install ecolect node in Debian , ubuntu, raspbian (latest versions in both operating system and nodered) and in all systems node-red halts after installation and deployment with the error
23 Mar 13:50:13 - [warn] [node-red-contrib-ecolect/ecolect] Error: Cannot find module 'ecolect/values/index' (line:21)
Does anyone knows a solution to the problem?
Thanks in advance,
Stam

Dynamic Enumeration

Hello, is it possible to do a dynamic set of the "enumeration"? It would be great if the values of the enumeration to a given field could be passed to ecolect.

Unable to enter phrases in ecolect and settings are not stored

Hi @DeanCording !
First part of making google actions node work is done.
When it comes to ecolect the phrases cannot be inserted and the settings are not being stored by the node.
I tried to use the following flow and after importing it, only the topic is visible.

[{"id":"c9e9e9a0.faa628","type":"ecolect","z":"30254762.66c5f8","name":"","topics":[{"name":"gardenlight","phrases":"turn {state} the {room} {item} at {when}\nturn {item} {state} in {room} at {when}\nturn {state} {room} {item}\nturn {room} {item} {state}","values":[{"name":"room","type":"enumeration","enumerations":["kitchen","bedroom","bathroom"]},{"name":"item","type":"enumeration","enumerations":["light","fan","radio"]},{"name":"state","type":"boolean","enumerations":[]},{"name":"when","type":"date-time","enumerations":[]}]}],"outputs":2,"x":240,"y":360,"wires":[["9933520b.09721"],["9933520b.09721"]]},{"id":"9933520b.09721","type":"debug","z":"30254762.66c5f8","name":"","active":true,"console":"false","complete":"true","x":385,"y":361,"wires":[]},{"id":"ff746222.bd305","type":"inject","z":"30254762.66c5f8","name":"","topic":"","payload":"turn on the kitchen light at 9pm","payloadType":"str","repeat":"","crontab":"","once":false,"x":83,"y":360,"wires":[["c9e9e9a0.faa628"]]}]

I'm running my flow as root. I don't know if this has anythinh to do with this.

screen shot 2018-02-17 at 3 45 49 pm

No output message

Hey Dean,

Great contribution. Really makes my flow much more interactive.

Yesterday I suddenly noticed that my ecolect node stopped sending output messages. After a while I found that I used in the phrases section a non-existing item.

For example, if you mispelled room as 'roommmm':
image

Then no output message is generated, which is rather confusing...

Based on this config data:
image

I assume you can check (whether the phrases contain an non-existing item) in two different ways:

  • .js file : show a self-explaining error in the node status text
  • .html file : extend the validation function (on the phrases), but then I think you only get an error. But then he doesn't now what is wrong.

Would be nice if you could add some kind of validation.

Thanks !!!
Bart

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.