edu.cmu.sv.domain.smart_house.SmartHouseCommandLineSystem Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of yoda Show documentation
Show all versions of yoda Show documentation
A library that allows rapid prototyping of dialog systems (language understanding, discourse modelling, dialog management, language generation).
package edu.cmu.sv.domain.smart_house;
import edu.cmu.sv.domain.DatabaseRegistry;
import edu.cmu.sv.domain.DomainSpec;
import edu.cmu.sv.domain.NonDialogTaskRegistry;
import edu.cmu.sv.domain.smart_house.GUI.MainFrame;
import edu.cmu.sv.domain.smart_house.GUI.Simulator;
import edu.cmu.sv.domain.yoda_skeleton.YodaSkeletonLexicon;
import edu.cmu.sv.domain.yoda_skeleton.YodaSkeletonOntologyRegistry;
import edu.cmu.sv.yoda_environment.CommandLineYodaSystem;
import javax.swing.*;
/**
* Created by David Cohen on 3/4/15.
*/
public class SmartHouseCommandLineSystem extends CommandLineYodaSystem {
public static JFrame frame;
static {
Simulator.runningGUI = true;
// skeleton domain
domainSpecs.add(new DomainSpec(
"YODA skeleton domain",
new YodaSkeletonLexicon(),
new YodaSkeletonOntologyRegistry(),
new NonDialogTaskRegistry(),
new DatabaseRegistry()));
// smart house domain
domainSpecs.add(new DomainSpec(
"Smart house domain",
new SmartHouseLexicon(),
new SmartHouseOntologyRegistry(),
new SmartHouseNonDialogTaskRegistry(),
new SmartHouseDatabaseRegistry()));
SwingUtilities.invokeLater(new Runnable() {
public void run() {
frame = new MainFrame("Smart Home");
frame.setSize(400, 400);
frame.setLocation(900, 150);
// frame.setLocationRelativeTo(null);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setVisible(true);
}
});
}
}