Natural Language Processing

167 views
Skip to first unread message

Jenny Hawkins

unread,
May 21, 2013, 12:34:00 PM5/21/13
to tas...@googlegroups.com
I've been wanted to have a fully voice controlled phone for a while now. There's a plethora of apps out there for that, but none of them quite work the way I want, nor are they particularly customizable. Tasker, however, is beyond customizable. I didn't really want to use rigid phases with it, though. Turns out, there's a company out there, Maluuba, that, while they have their own control app, make their api available online. It takes in a phrase, and spits out a category, an action, and a bunch of entities (variables) that are just screaming for tasker. So, I wrote a little interface task, and a framework of tasks for all the currently available actions. Those tasks I left empty, so folk can make them the way they want them.

<a href="http://tasker.wikidot.com/getnaturallanguage">Natural Language Processing</a>

TomL

unread,
May 21, 2013, 12:36:39 PM5/21/13
to tas...@googlegroups.com
Wow, this is super cool, thank you for writing it up in the wiki!

Tom

Pent

unread,
May 22, 2013, 2:36:40 AM5/22/13
to Tasker
Thanks for sharing, Jenny. You've been very busy recently :-)

Pent

Jenny Hawkins

unread,
May 22, 2013, 2:57:54 AM5/22/13
to tas...@googlegroups.com
Thanks. I even tried making it a plugin, but the flow just didn't work the way I wanted. I wanted it usable right in the middle of a task, and Tasker doesn't wait for plugins to do their thing before it continues, unless you do conditions and use another profile. It does wait for scriptlets, though.

Vladimir Oz

unread,
May 22, 2013, 3:34:32 AM5/22/13
to tas...@googlegroups.com
Yeap. That's cool job! While Your main JSLet relies on clear result with exact words in %answer, voice recognotion in loudness environment is too pure. The same word in silent room and outdoor recognized differently 
I have the hamble old project with same goal. It's more JS-based and uses some kind of regular expressions for alternate Key Words on each step which makes the choice of command while going through library's hierarchy.

Vladimir Oz

unread,
May 22, 2013, 4:25:43 AM5/22/13
to tas...@googlegroups.com
is too poor
:) sure

среда, 22 мая 2013 г., 11:34:32 UTC+4 пользователь Vladimir Oz написал:
is too pure. 

Jenny Hawkins

unread,
May 22, 2013, 11:26:53 AM5/22/13
to tas...@googlegroups.com
Gotta love auto-correct. :)

That's good stuff. The Maluuba api is pretty restricted, and mostly good for common personal assistant type commands. I definitely need to use customizable command sets outside of the api. At the moment, I'm using the Autovoice plugin, which triggers profiles based on what you say, to handle out-of-api commands. I'll definitely be studying your script for more options.

You did give me an idea, though. I'm going to try and see if I can pass a phrase through a grammar or a makes-sense check before I parse it. I'd be very surprised if there wasn't an accessible way to do so.

Saad Thahim

unread,
May 22, 2013, 3:26:50 PM5/22/13
to tas...@googlegroups.com
I think its only for rooted device yeh?

Vladimir Oz

unread,
May 23, 2013, 2:15:23 AM5/23/13
to tas...@googlegroups.com
The Regular Expression in JS permits to say "Player play" or "Music start" or "Music play" or" Player start" or even "Why my f...n player didn't start yet?!" if command set defined as follow:
first level  -->  Player|Music
2nd level  --> play|start ; pause|stop -- two commands in this set

It could contain any number of commands and consist of any number of levels. It would be faster if keywords defined right in script.

Nicky Doyle

unread,
Sep 13, 2013, 12:06:08 AM9/13/13
to tas...@googlegroups.com
i saw this in taker wiki but how do i set it up? is the profile a http get if so what the address layout using my api? or is it a python script i have used wolfram alpha api but cant seem to get this one working  :) any helpo would be excellent 

Jenny Hawkins

unread,
Sep 13, 2013, 12:52:09 AM9/13/13
to tas...@googlegroups.com
This works via a HTTP Get. You supply a phase, the main task retrieves a json reply. It uses a java scriptlet (which runs right inside tasked) to parse the Jason out into usable variables, including a category, an action, and usually one or more entities. It then launches another task based on the category and the action.

The project on the wiki includes a task for each of the actions present at the time I wrote it. They are skeletons, though. You'll need to add in what you want each to do. The main task that does the parsing is self contained. It handles all of the api.

You will need to get an api key from Maluuba. There are links for that in the wiki, and in the comments in the task. Some of their documentation impress you need to wait for the key, but it was actually instant.

So, in essence, get an api key, import the project from the wiki, feed it a phrase, do cool stuff with the results.

Nicky Doyle

unread,
Sep 13, 2013, 1:31:11 AM9/13/13
to tas...@googlegroups.com
thanks for the quick reply sorry im not trying to be stupid but do i need to set you a http get because i dont see it in the project. ? i got the api. how do i supply a phase say i got autovoice i would use %avcommnofilter but here do i put this?

Jenny Hawkins

unread,
Sep 13, 2013, 9:37:49 AM9/13/13
to tas...@googlegroups.com
Inside the task Natural Language Online Parser, the first action should be a set var. Make the set-to %avcomnofilter, then call the task from an AutoVoice profile. The HTTP GET and the parsing of the return ask happens in that task.

Nicky Doyle

unread,
Sep 23, 2013, 1:09:51 AM9/23/13
to tas...@googlegroups.com
thank you got it :) ill look forward to messing with this cheers

Sriram SV

unread,
Aug 4, 2016, 2:29:11 AM8/4/16
to Tasker

I know its been a long time since this post  has been created and there are hell lot of APIs (wit.ai, api.ai) which understand NL and gives us some context on what the user is trying to convey.


Also ,I am interested in knowing how the XML schema for tasker profiles and tasks are structured so that we could tie the existing APIs to understand natural context and bring about dynamically  constructed profiles or tasks within tasker which will be a paradigm in itself.

@pent .. your inputs towards are very appreciated
Reply all
Reply to author
Forward
0 new messages