Search in sources :

Example 21 with Intent

use of org.openhab.ui.habot.nlp.Intent in project habot by ghys.

the class TrainerDeTest method testCreateRule.

@Test
public void testCreateRule() throws Exception {
    Intent actual;
    this.trainer = new IntentTrainer("de", skills, null, "alphanumeric");
    actual = interpret("einen Timer stellen");
    assertEquals(Skills.CREATE_RULE, actual.getName());
    actual = interpret("Erstelle eine Regel, die um 8 Uhr läuft.");
    assertEquals(Skills.CREATE_RULE, actual.getName());
}
Also used : IntentTrainer(org.openhab.ui.habot.nlp.internal.IntentTrainer) Intent(org.openhab.ui.habot.nlp.Intent) Test(org.junit.Test)

Aggregations

Intent (org.openhab.ui.habot.nlp.Intent)21 Test (org.junit.Test)11 IntentTrainer (org.openhab.ui.habot.nlp.internal.IntentTrainer)11 Set (java.util.Set)7 Collectors (java.util.stream.Collectors)7 Item (org.eclipse.smarthome.core.items.Item)7 ItemRegistry (org.eclipse.smarthome.core.items.ItemRegistry)7 Reference (org.osgi.service.component.annotations.Reference)7 IntentInterpretation (org.openhab.ui.habot.nlp.IntentInterpretation)5 Skill (org.openhab.ui.habot.nlp.Skill)5 EventPublisher (org.eclipse.smarthome.core.events.EventPublisher)4 AbstractItemIntentInterpreter (org.openhab.ui.habot.nlp.AbstractItemIntentInterpreter)4 ImmutableMap (com.google.common.collect.ImmutableMap)3 Collection (java.util.Collection)3 List (java.util.List)3 ItemEventFactory (org.eclipse.smarthome.core.items.events.ItemEventFactory)3 TransformationHelper (org.eclipse.smarthome.core.transform.TransformationHelper)3 State (org.eclipse.smarthome.core.types.State)3 StateDescription (org.eclipse.smarthome.core.types.StateDescription)3 CardBuilder (org.openhab.ui.habot.card.CardBuilder)3