Package com.googlecode.gaal.analysis.impl.EmbeddedIntervalExtractor

Examples of com.googlecode.gaal.analysis.impl.EmbeddedIntervalExtractor.EmbeddedContext.rightSequence()


            Context context = new EmbeddedContext(embeddedInterval);
            Interval interval = embeddedInterval.getEmbeddingInterval();
            double leftRightContextRatio = (double) embeddedInterval.size() / interval.size();
            System.out.printf("%s %s %s\n", corpus.toString(context.leftSequence(), delimiter),
                    corpus.toString(embeddedInterval.fillerIterator(), delimiter),
                    corpus.toString(context.rightSequence(), delimiter));
            System.out.printf("ratio:%.2f\n", leftRightContextRatio);
        }
    }

    public void printSrcRecursiveIntervals(IntervalSetBuilder intervalSetBuilder, double minLeftRightContextRatio,
View Full Code Here


        Iterable<EmbeddedInterval> contextExtractor = new EmbeddedContextExtractor(lst, corpus,
                new SupermaximalSetBuilder(), new NoContextFilter<EmbeddedInterval>(), WINDOW_SIZE);
        for (EmbeddedInterval embeddedInterval : contextExtractor) {
            Context context = new EmbeddedContext(embeddedInterval);
            System.out.printf("%s %s %s\n", corpus.toString(context.leftSequence(), " "),
                    corpus.toString(context.fillerSet(), " "), corpus.toString(context.rightSequence(), " "));
        }
    }

    @Test
    public void testEmbeddedContexts() {
View Full Code Here

        System.out.println("Embedded Suffix Tree Test");
        int counter = 0;
        for (EmbeddedInterval embeddedInterval : embeddedExtractor) {
            Context context = new EmbeddedContext(embeddedInterval);
            IntSequence left = context.leftSequence();
            IntSequence right = context.rightSequence();
            Multiset<IntSequence> expectedSet = fillerSet(left, right);
            Multiset<IntSequence> resultSet = context.fillerSet();
            if (!resultSet.equals(expectedSet)) {
                String leftString = corpus.toString(left, " ");
                String rightString = corpus.toString(right, " ");
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.