Giter Club home page Giter Club logo

laice's Introduction

laice
Icon by simpleicons

Train your own Natural Language Processor straight from your browser!


What?

Laice allows you to build, train, and classify your own sentences via a Web UI. Laice can also communicate with your applications through a RESTful API.

In other words, laice aims to be a free, open sourced alternative to api.ai, luis.ai, and wit.ai

Laice turns words into meanings (with enough training data), for example:

  • Jack lives in Berlin -> {'person': 'Jack', 'location': 'Berlin'}
  • Tutu really likes bananas -> {'person': 'Tutu', 'food': 'bananas'}
  • Close the door -> {'action': 'close', 'object': 'door'}

Getting started

git clone https://github.com/kendricktan/laice.git
cd laice

npm install -g bower
bower install

pip3 install -r requirements.txt

# Optional, doing this will yeild more accurate
# predictions, however will have a slower startup
# time. Its downloading pre-processed data.
python3 -m spacy.en.download --force all 
python3 manage.py migrate
python3 manage.py runserver

Then navigate to http://127.0.0.1:8000 to view your own Natural Language Processor!


Contributing

Currently we're using React frontend coupled with a django backend. JavaScript files are written in jsx and then compiled to js using gulp.

Frontend

To get started with frontend development, make sure you have npm, bower, gulp installed globally.

npm install -g bower
npm install -g gulp
npm install
bower install
gulp

Backend

To get started with backend development, make sure you have installed everything in the requirements installed

pip install -r requirements

laice's People

Contributors

jabelone avatar kendricktan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

laice's Issues

How do we use laice to train data?

I have been trying to work on a project which has the American constitution as the dataset. I want to know how can I use laice to train the data so as to implement the American constitution and convert the constitution in the data format.

How can I identify intents?

Hi

LUIS.AI enables the trainers to specify an 'intent'. can this be done here? if not, and i am to add it (i mean, contribute to the project by coding), how would you go about it?

thanks very much
Lior

wont migrate

hi.. hoping you can help with this problem trying to start the migrate command

greg@ubuntuvm:~/laice$ python manage.py migrate
Traceback (most recent call last):
File "manage.py", line 22, in
execute_from_command_line(sys.argv)
File "/home/greg/.local/lib/python2.7/site-packages/django/core/management/init.py", line 367, in execute_from_command_line
utility.execute()
File "/home/greg/.local/lib/python2.7/site-packages/django/core/management/init.py", line 359, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/greg/.local/lib/python2.7/site-packages/django/core/management/base.py", line 294, in run_from_argv
self.execute(*args, **cmd_options)
File "/home/greg/.local/lib/python2.7/site-packages/django/core/management/base.py", line 342, in execute
self.check()
File "/home/greg/.local/lib/python2.7/site-packages/django/core/management/base.py", line 374, in check
include_deployment_checks=include_deployment_checks,
File "/home/greg/.local/lib/python2.7/site-packages/django/core/management/commands/migrate.py", line 62, in _run_checks
issues.extend(super(Command, self)._run_checks(**kwargs))
File "/home/greg/.local/lib/python2.7/site-packages/django/core/management/base.py", line 361, in _run_checks
return checks.run_checks(**kwargs)
File "/home/greg/.local/lib/python2.7/site-packages/django/core/checks/registry.py", line 81, in run_checks
new_errors = check(app_configs=app_configs)
File "/home/greg/.local/lib/python2.7/site-packages/django/core/checks/urls.py", line 14, in check_url_config
return check_resolver(resolver)
File "/home/greg/.local/lib/python2.7/site-packages/django/core/checks/urls.py", line 24, in check_resolver
for pattern in resolver.url_patterns:
File "/home/greg/.local/lib/python2.7/site-packages/django/utils/functional.py", line 35, in get
res = instance.dict[self.name] = self.func(instance)
File "/home/greg/.local/lib/python2.7/site-packages/django/urls/resolvers.py", line 313, in url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "/home/greg/.local/lib/python2.7/site-packages/django/utils/functional.py", line 35, in get
res = instance.dict[self.name] = self.func(instance)
File "/home/greg/.local/lib/python2.7/site-packages/django/urls/resolvers.py", line 306, in urlconf_module
return import_module(self.urlconf_name)
File "/usr/lib/python2.7/importlib/init.py", line 37, in import_module
import(name)
File "/home/greg/laice/laice/urls.py", line 25, in
url( r'^api/', include( 'api.urls' ) ),
File "/home/greg/.local/lib/python2.7/site-packages/django/conf/urls/init.py", line 50, in include
urlconf_module = import_module(urlconf_module)
File "/usr/lib/python2.7/importlib/init.py", line 37, in import_module
import(name)
File "/home/greg/laice/api/urls.py", line 5, in
from stories.views import (
File "/home/greg/laice/stories/views.py", line 7, in
from laice.core.viewsets import ViewMappingMixin
ImportError: No module named core.viewsets

Unconfigured requests

do Unconfigured requests get used in the training??

I have items that when queried or by cURL are correct and do not require changes, but these items remain as Unconfigured.

should there be a button to manually mark these as configured?

Oz

Pretty cool, blog post?

I've cloned and tested it out, it's pretty cool stuff. Care to write a blog post explaining how you made this? I would love to make something similar.

Response wrongly formatted

Hi guys,

I just got the app up and running and from my first tentative, the output is wrongly formatted.

Here is what I was supposed to get:

  • Jack lives in Berlin -> {'person': 'Jack', 'location': 'Berlin'}
  • Tutu really likes bananas -> {'person': 'Tutu', 'food': 'bananas'}
  • Close the door -> {'action': 'close', 'object': 'door'}

the output keys are at the right places, but on my output, the keys are the values, and it doesn't get rid of punctuations.

[
   {
      "id":6,
      "querystring":"where can I get a car",
      "configured":false,
      "parsed_ner":{
         "get":"action",
         "where":"object"
      }
   },
   {
      "id":7,
      "querystring":"how to drive a car",
      "configured":false,
      "parsed_ner":{
         "car":"object",
         "drive":"action"
      }
   },
   {
      "id":8,
      "querystring":"can you teach me how to shoot a basketball?",
      "configured":false,
      "parsed_ner":{
         "me":"action",
         "teach":"action",
         "shoot":"action",
         "basketball":"object",
         "?":"action"
      }
   }
]

for the weird parts, me,where taken as valid in parsing, I guess it's because of the tiny size of the training dataset

Deploy issues : python3 manage.py migrate

Platform: homebrew OSX Sierra

Traceback (most recent call last):
File "manage.py", line 22, in
execute_from_command_line(sys.argv)
File "/usr/local/lib/python3.5/site-packages/django/core/management/init.py", line 367, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python3.5/site-packages/django/core/management/init.py", line 341, in execute
django.setup()
File "/usr/local/lib/python3.5/site-packages/django/init.py", line 27, in setup
apps.populate(settings.INSTALLED_APPS)
File "/usr/local/lib/python3.5/site-packages/django/apps/registry.py", line 115, in populate
app_config.ready()
File "/Users/pato/Software/laice/stories/apps.py", line 8, in ready
from stories import signals
File "/Users/pato/Software/laice/stories/signals.py", line 4, in
from laice.utils import spacy_ner
File "/Users/pato/Software/laice/laice/utils/spacy_ner.py", line 6, in
import spacy
File "/usr/local/lib/python3.5/site-packages/spacy/init.py", line 3, in
from .util import set_lang_class, get_lang_class
File "/usr/local/lib/python3.5/site-packages/spacy/util.py", line 9, in
from .attrs import TAG, HEAD, DEP, ENT_IOB, ENT_TYPE
ImportError: dlopen(/usr/local/lib/python3.5/site-packages/spacy/attrs.cpython-35m-darwin.so, 2): no suitable image found. Did find:
/usr/local/lib/python3.5/site-packages/spacy/attrs.cpython-35m-darwin.so: mach-o, but wrong architecture
/usr/local/lib/python3.5/site-packages/spacy/attrs.cpython-35m-darwin.so: mach-o, but wrong architecture

python2.7 and node 0.10.40

Hello!

I trying to test your projects but I have other version of python and node js.

Does it have any limitation?

Thx

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.