Examples of leftSequence()


Examples of com.googlecode.gaal.analysis.api.Context.leftSequence()

                contextFilter, windowSize);
        for (EmbeddedInterval embeddedInterval : contextExtractor) {
            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);
        }
    }
View Full Code Here

Examples of com.googlecode.gaal.analysis.api.Context.leftSequence()

                return false;
            if (getClass() != obj.getClass())
                return false;
            Context other = (Context) obj;
            if (left == null) {
                if (other.leftSequence() != null)
                    return false;
            } else if (!left.equals(other.leftSequence()))
                return false;
            if (right == null) {
                if (other.rightSequence() != null)
View Full Code Here

Examples of com.googlecode.gaal.analysis.api.Context.leftSequence()

                return false;
            Context other = (Context) obj;
            if (left == null) {
                if (other.leftSequence() != null)
                    return false;
            } else if (!left.equals(other.leftSequence()))
                return false;
            if (right == null) {
                if (other.rightSequence() != null)
                    return false;
            } else if (!right.equals(other.rightSequence()))
View Full Code Here

Examples of com.googlecode.gaal.analysis.api.Context.leftSequence()

    public void testPrint() throws FileNotFoundException {
        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
View Full Code Here

Examples of com.googlecode.gaal.analysis.api.Context.leftSequence()

    public void testEmbeddedContexts() {
        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, " ");
View Full Code Here

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

                contextFilter, windowSize);
        for (EmbeddedInterval embeddedInterval : contextExtractor) {
            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);
        }
    }
View Full Code Here

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

    public void testPrint() throws FileNotFoundException {
        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
View Full Code Here

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

    public void testEmbeddedContexts() {
        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, " ");
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.