tree: 266487bbf69707305cecf20c8728541327bad0ba [path history] [tgz]
  1. README.md
  2. weather_model.json
  3. WeatherModel.java
  4. WeatherResultWrapper.java
  5. WeatherTest.java
nlpcraft/src/main/scala/org/apache/nlpcraft/examples/weather/README.md

License build Documentation Status Gitter

Weather Service Example

This example demonstrates relatively complete NLI-based weather service with JSON output and a non-trivial intent matching logic. It uses https://www.apixu.com REST service for the actual weather information.

Running

You can run necessary JVMs for this example similarly from command line or IDE. NOTE: that you don't need to start Data Probe standalone if you are only running the unit test as it uses the embedded probe and starts it automatically:

  • Run REST server:
    • Main class: org.apache.nlpcraft.NCStart
    • Program arguments: -server
  • To run unit test with embedded probe:
    • JUnit 5 test: org.apache.nlpcraft.examples.weather.WeatherTest
  • To run probe standalone and use your own REST client:
    • Main class: org.apache.nlpcraft.NCStart
    • VM arguments: -Dconfig.override_with_env_vars=true
    • Environment variables: CONFIG_FORCE_nlpcraft_probe_models.0=org.apache.nlpcraft.examples.weather.WeatherModel
    • Program arguments: -probe

Documentation

See Getting Started guide for more instructions on how to run these examples.

For any questions, feedback or suggestions:

Copyright

Copyright (C) 2020 Apache Software Foundation