Skip to content

Commit

Permalink
Merge pull request #62 from snipsco/release/0.58.0
Browse files Browse the repository at this point in the history
Release 0.58.0
  • Loading branch information
adrienball authored Jul 17, 2018
2 parents fb1fea2 + 4e18109 commit 4728835
Show file tree
Hide file tree
Showing 89 changed files with 15,259 additions and 3,093 deletions.
30 changes: 30 additions & 0 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
environment:
matrix:
- TARGET: x86_64-pc-windows-msvc

branches:
only:
- develop
- master

install:
- appveyor-retry appveyor DownloadFile https://win.rustup.rs/ -FileName rustup-init.exe
- rustup-init.exe -y --default-host %TARGET%
- set PATH=%PATH%;C:\Users\appveyor\.cargo\bin
- if defined MSYS2_BITS set PATH=%PATH%;C:\msys64\mingw%MSYS2_BITS%\bin
- rustc -V
- cargo -V
- echo [workspace] > Cargo.toml
- echo members = [ >> Cargo.toml
- echo "snips-nlu-ffi", >> Cargo.toml
- echo "snips-nlu-ffi/python/snips-nlu-python-ffi", >> Cargo.toml
- echo "snips-nlu-lib", >> Cargo.toml
- echo "snips-nlu-cli", >> Cargo.toml
- echo ] >> Cargo.toml
- ps: (Get-Content snips-nlu-ffi/python/snips-nlu-python-ffi/Cargo.toml) | ForEach-Object { $_ -replace "^snips-nlu-ffi = .*$", "snips-nlu-ffi = { path = `"../..`" }" } | Set-Content snips-nlu-ffi/python/snips-nlu-python-ffi/Cargo.toml

build: false

test_script:
- cargo build --all --tests --benches
- cargo test --all
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ before_install: . ./.travis/before_install.sh

install: ./.travis/install.sh

script: travis_wait 40 bash ./.travis/test.sh
script: ./.travis/test.sh

git:
depth: 10
3 changes: 1 addition & 2 deletions .travis/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ members=[
"snips-nlu-ffi",
"snips-nlu-ffi/python/snips-nlu-python-ffi",
"snips-nlu-lib",
"snips-nlu-resources",
"snips-nlu-resources-packed"
"snips-nlu-cli"
]' > Cargo.toml

echo "Replacing snips-nlu-ffi url for local version"
Expand Down
8 changes: 1 addition & 7 deletions .travis/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,7 @@ source .travis/common.sh

if [ "${RUST_TESTS}" == "true" ]; then
echo "Running rust tests..."
# Uncomment when snips-nlu-resources-packed will be replaced by an other solution that take less memory
#cargo test --all || die "Rust tests failed"
cargo run -p snips-nlu-lib \
--example weather \
snips-nlu-lib/examples/trained_assistant.json \
"What will be the weather in London tomorrow at 8am?" \
|| die "Rust example failed"
cargo test --all || die "Rust tests failed"
fi

if [ "${PYTHON_TESTS}" == "true" ]; then
Expand Down
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
# Changelog
All notable changes to this project will be documented in this file.

## [0.58.0] - 2018-07-17`
### Added
- Interactive parsing CLI

### Changed
- The `SnipsNluEngine` object is now loaded from a directory instead of a single json file
(see https://github.com/snipsco/snips-nlu/releases/tag/0.16.0).
- Language resources are now loaded *dynamically* from the trained engine directory instead of
being statically hardcoded, reducing the binary size by 31Mb.

### Removed
- `snips-nlu-resources` and `snips-nlu-resources-packed` crates no longer exists.
- `FileBasedConfiguration`, `ZipBasedConfiguration` and `NluEngineConfigurationConvertible
- Rust examples (replaced by interactive CLI).

## [0.57.2] - 2018-07-12
### Fixed
- Conflict with bindgen dependency
Expand Down Expand Up @@ -64,6 +79,7 @@ All notable changes to this project will be documented in this file.
- Rename python package to `snips_nlu_rust`


[0.58.0]: https://github.com/snipsco/snips-nlu-rs/compare/0.57.2...0.58.0
[0.57.2]: https://github.com/snipsco/snips-nlu-rs/compare/0.57.1...0.57.2
[0.57.1]: https://github.com/snipsco/snips-nlu-rs/compare/0.57.0...0.57.1
[0.57.0]: https://github.com/snipsco/snips-nlu-rs/compare/0.56.1...0.57.0
Expand Down
26 changes: 17 additions & 9 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ Snips NLU Rust
.. image:: https://travis-ci.org/snipsco/snips-nlu-rs.svg?branch=develop
:target: https://travis-ci.org/snipsco/snips-nlu-rs

.. image:: https://ci.appveyor.com/api/projects/status/github/snipsco/snips-nlu-rs?branch=develop&svg=true
:target: https://ci.appveyor.com/project/snipsco/snips-nlu-rs

Installation
------------

Expand Down Expand Up @@ -61,19 +64,24 @@ This repository only contains the inference part, in order to produce trained mo
the `Snips NLU python library <https://github.com/snipsco/snips-nlu>`_.


API Usage
---------
Interactive CLI and API Usage
-----------------------------

The `rust interactive cli <snips-nlu-cli>`_ is a good example of to how to use ``snips-nlu-rs``.

Check out the `rust example <snips-nlu-lib/examples>`_ to see how to use Snips.
Here is how you can run the example:
Here is how you can run the interactive parsing cli:

.. code-block:: bash
git clone https://github.com/snipsco/snips-nlu-rs
cd snips-nlu-rs
git submodule update --init --recursive
cd snips-nlu-lib
cargo run --example weather examples/trained_assistant.json "What will be the weather in London tomorrow at 8am?"
$ git clone https://github.com/snipsco/snips-nlu-rs
$ cd snips-nlu-rs/snips-nlu-cli
$ cargo run ../data/tests/models/trained_engine
Here we used a sample trained engine, which consists in two intents: ``MakeCoffee`` and ``MakeTea``.
Thus, it will be able to parse queries like ``"Make me two cups of coffee please"`` or ``"I'd like a hot tea"``.

As mentioned in the previous section, you can train your own nlu engine with the
`Snips NLU python library <https://github.com/snipsco/snips-nlu>`_.


License
Expand Down
Loading

0 comments on commit 4728835

Please sign in to comment.