tree: 93eeb25bfefcb193af057df6343a230575dab4ca [path history] [tgz]
  1. README.md
  2. time_model.yaml
  3. TimeModel.java
  4. TimeModelApp.java
  5. TimeTest.java
nlpcraft/src/main/scala/org/apache/nlpcraft/examples/time/README.md

License Jenkins Documentation Status Gitter

Time Example

This example data model answers the questions about current time, either local to the caller or at some city. It provides YAML response with time and timezone information and uses YAML model definition.

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.time.TimeTest
  • 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.time.TimeModel
    • 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