Package com.googlecode.gaal.suffix.api.EmbeddedSuffixTree

Examples of com.googlecode.gaal.suffix.api.EmbeddedSuffixTree.EmbeddedInterval


        drawing.drawMatrix(documentLabels, termLabels, values);
    }

    public static String toString(Interval interval, Corpus<String> corpus) {
        if (interval instanceof EmbeddedInterval) {
            EmbeddedInterval embeddedInterval = (EmbeddedInterval) interval;
            return String.format("%s$\\dots$%s", toString(embeddedInterval.getEmbeddingInterval(), corpus),
                    corpus.toString(embeddedInterval.label(), DELIMITER));
        }
        return corpus.toString(interval.label(), DELIMITER);
    }
View Full Code Here


            for (int j = 0; j < lcp; j++) {
                repeatsMap.put(indices.get(i) + j, number);
            }
        }
        if (interval instanceof EmbeddedInterval) {
            EmbeddedInterval embeddedInterval = (EmbeddedInterval) interval;
            mapInterval(embeddedInterval.getEmbeddingInterval(), embeddedInterval.embeddingIndices(), repeatsMap,
                    number);
        }
    }
View Full Code Here

        }
    }

    public static <S> String toString(Interval interval, Corpus<S> corpus, boolean asLaTeX) {
        if (interval instanceof EmbeddedInterval) {
            EmbeddedInterval embeddedInterval = (EmbeddedInterval) interval;
            String embeddingLabel = toString(embeddedInterval.getEmbeddingInterval(), corpus, asLaTeX);
            String embeddedLabel = corpus.toString(embeddedInterval.label(), delimiter);
            if (asLaTeX) {
                return String.format("%s \\dots %s", embeddingLabel, embeddedLabel);
            } else {
                return String.format("%s %s %s", embeddingLabel,
                        corpus.toString(embeddedInterval.fillerSet(), delimiter), embeddedLabel);
            }
        }
        return String.format("%s", corpus.toString(interval.label(), delimiter));
    }
View Full Code Here

        @Override
        public EmbeddedInterval next() {
            if (next == null)
                throw new NoSuchElementException();
            EmbeddedInterval context = next;
            next = advance();
            return context;
        }
View Full Code Here

            return next != null;
        }

        @Override
        public EmbeddedInterval next() {
            EmbeddedInterval context = next;
            next = advance();
            return context;
        }
View Full Code Here

            return context;
        }

        private EmbeddedInterval advance() {
            while (embeddedIterator.hasNext()) {
                EmbeddedInterval next = embeddedIterator.next();
                if (contextFilter == null || contextFilter.passed(next)) {
                    return next;
                }
            }
            return null;
View Full Code Here

        @Override
        public EmbeddedInterval next() {
            if (next == null)
                throw new NoSuchElementException();
            EmbeddedInterval context = next;
            next = advance();
            return context;
        }
View Full Code Here

TOP

Related Classes of com.googlecode.gaal.suffix.api.EmbeddedSuffixTree.EmbeddedInterval

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.