Package com.googlecode.gaal.data.api

Examples of com.googlecode.gaal.data.api.IntSequence


    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, " ");
                String rightString = corpus.toString(right, " ");
View Full Code Here


    @Test
    public void testNestedContexts() {
        System.out.println("Nested Maximality Test");
        int counter = 0;
        for (Context context : nestedExtractor) {
            IntSequence left = context.leftSequence();
            IntSequence right = context.rightSequence();
            Multiset<IntSequence> expectedSet = fillerSet(left, right);
            Multiset<IntSequence> resultSet = context.fillerSet();
            for (IntSequence filler : resultSet) {
                int expectedQuantity = expectedSet.getQuantity(filler);
                int resultQuantity = resultSet.getQuantity(filler);
View Full Code Here

                expectedSet = new HashMultiset<IntSequence>();
                for (int i = rightInterval.left(); i <= rightInterval.right(); i++) {
                    int end = suffixTable[i];
                    Integer start = leftIndices.floor(end);
                    if (start != null && end - start < WINDOW_SIZE) {
                        IntSequence fillerSeq = lst.getSequence().subSequence(start, end);
                        boolean hasSpecial = false;
                        for (int j = 0; j < fillerSeq.size(); j++) {
                            if (corpus.isSeparator(fillerSeq.get(j))) {
                                hasSpecial = true;
                                break;
                            }
                        }
                        if (!hasSpecial)
View Full Code Here

        }
    }

    @Test
    public void testSequence() {
        IntSequence sequence = corpus.sequence();
        System.out.println(sequence);
        assertTrue(sequence.size() == SEQUENCE.size());
        for (int i = 0; i < SEQUENCE.size(); i++) {
            assertTrue(sequence.get(i) == SEQUENCE.get(i));
        }
    }
View Full Code Here

TOP

Related Classes of com.googlecode.gaal.data.api.IntSequence

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.