Package etc.aloe.data

Examples of etc.aloe.data.MessageSet


     * Test of segment method, of class ThresholdSegmentation.
     */
    @Test
    public void testSegment_byParticipant() {
        System.out.println("segment_byParticipant");
        MessageSet messages = new MessageSet();

        messages.add(new Message(0, new Date(), "Alice", "it's"));
        messages.add(new Message(1, new Date(), "Bob", "cow"));
        messages.add(new Message(2, new Date(), "Alice", "time"));
        messages.add(new Message(3, new Date(), "Bob", "noooooooo"));
        messages.add(new Message(4, new Date(), "Bob", "once"));
        messages.add(new Message(5, new Date(), "Alice", "upon"));
        messages.add(new Message(6, new Date(), "Bob", "a"));
        messages.add(new Message(7, new Date(), "Alice", "time"));

        ThresholdSegmentation instance = new ThresholdSegmentation(30, true);
        SegmentSet segments = instance.segment(messages);

        //Expecting 2 segments, one for each participant
View Full Code Here


     * Test of segment method, of class ThresholdSegmentation.
     */
    @Test
    public void testSegment_notByParticipant() {
        System.out.println("segment_notByParticipant");
        MessageSet messages = new MessageSet();

        messages.add(new Message(0, new Date(), "Alice", "it's"));
        messages.add(new Message(1, new Date(), "Bob", "cow"));
        messages.add(new Message(2, new Date(), "Alice", "time"));
        messages.add(new Message(3, new Date(), "Bob", "noooooooo"));
        messages.add(new Message(4, new Date(), "Bob", "once"));
        messages.add(new Message(5, new Date(), "Alice", "upon"));
        messages.add(new Message(6, new Date(), "Bob", "a"));
        messages.add(new Message(7, new Date(), "Alice", "time"));

        ThresholdSegmentation instance = new ThresholdSegmentation(30, false);
        SegmentSet segments = instance.segment(messages);

        //Expecting 1 segment
View Full Code Here

TOP

Related Classes of etc.aloe.data.MessageSet

Copyright © 2018 www.massapicom. 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.