Examples of Utterance


Examples of nl.nuggit.randomstranger.language.Utterance

        start();
        System.out.println(name + " has started");
    }

    public void receive(String name, String input) {
        memory.currentDiscussion().addUtterance(new Utterance(name, input));
    }
View Full Code Here

Examples of nl.nuggit.randomstranger.language.Utterance

        memory.currentDiscussion().addUtterance(new Utterance(name, input));
    }

    public void send(String message) {
        out.println(String.format("%s : %s", name, message));
        memory.currentDiscussion().addUtterance(new Utterance(name, message));
    }
View Full Code Here

Examples of nl.nuggit.randomstranger.language.Utterance

        }
    }

    private String determineResponse(Discussion discussion) {
        String response = null;
        Utterance lastUtterance = discussion.getLastUtterance();
        if (discussion.getSilenceSeconds() > (lastUtterance.complexity() / 2)) {
            if (lastUtterance.getMessage().contains("?")) {
                response = "I have no idea...";
            }
            else if (lastUtterance.complexity() < 3) {
                response = "sup?";
            }
            else if (lastUtterance.complexity() < 10) {
                response = "you could say that";
            }
            else {
                response = "hmmm.... interesting";
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.