Package eu.danieldk.dictomaton

Examples of eu.danieldk.dictomaton.DictionaryBuilder


        /**
         * Construct a {@link ImmutableStringFloatMap}.
         */
        public synchronized ImmutableStringFloatMap build() throws DictionaryBuilderException {
            PerfectHashDictionary dict = new DictionaryBuilder().addAll(d_map.keySet()).buildPerfectHash(false);

            float[] values = new float[d_map.size()];

            int i = 0;
            for (float value : d_map.values())
View Full Code Here


        private final DictionaryBuilder dictionaryBuilder;

        private final ArrayList<Float> values;

        public OrderedBuilder() {
            this.dictionaryBuilder = new DictionaryBuilder();
            this.values = new ArrayList<Float>();
        }
View Full Code Here

        /**
         * Construct a {@link ImmutableStringByteMap}.
         */
        public synchronized ImmutableStringByteMap build() throws DictionaryBuilderException {
            PerfectHashDictionary dict = new DictionaryBuilder().addAll(d_map.keySet()).buildPerfectHash(false);

            byte[] values = new byte[d_map.size()];

            int i = 0;
            for (byte value : d_map.values())
View Full Code Here

        private final DictionaryBuilder dictionaryBuilder;

        private final ArrayList<Byte> values;

        public OrderedBuilder() {
            this.dictionaryBuilder = new DictionaryBuilder();
            this.values = new ArrayList<Byte>();
        }
View Full Code Here

            if (StringUtils.getLevenshteinDistance(str, permuted) <= distance)
                shouldHave.add(permuted);
        }

        Dictionary dict = new DictionaryBuilder().addAll(all).build();
        LevenshteinAutomaton la = new LevenshteinAutomaton(str, distance);

        Assert.assertEquals(shouldHave, la.intersectionLanguage(dict));
    }
View Full Code Here

        /**
         * Construct a {@link ImmutableStringIntMap}.
         */
        public synchronized ImmutableStringIntMap build() throws DictionaryBuilderException {
            PerfectHashDictionary dict = new DictionaryBuilder().addAll(d_map.keySet()).buildPerfectHash(false);

            int[] values = new int[d_map.size()];

            int i = 0;
            for (int value : d_map.values())
View Full Code Here

        private final DictionaryBuilder dictionaryBuilder;

        private final ArrayList<Integer> values;

        public OrderedBuilder() {
            this.dictionaryBuilder = new DictionaryBuilder();
            this.values = new ArrayList<Integer>();
        }
View Full Code Here

        /**
         * Construct a {@link ImmutableStringBooleanMap}.
         */
        public synchronized ImmutableStringBooleanMap build() throws DictionaryBuilderException {
            PerfectHashDictionary dict = new DictionaryBuilder().addAll(d_map.keySet()).buildPerfectHash(false);

            boolean[] values = new boolean[d_map.size()];

            int i = 0;
            for (boolean value : d_map.values())
View Full Code Here

        private final DictionaryBuilder dictionaryBuilder;

        private final ArrayList<Boolean> values;

        public OrderedBuilder() {
            this.dictionaryBuilder = new DictionaryBuilder();
            this.values = new ArrayList<Boolean>();
        }
View Full Code Here

        /**
         * Construct a {@link ImmutableStringLongMap}.
         */
        public synchronized ImmutableStringLongMap build() throws DictionaryBuilderException {
            PerfectHashDictionary dict = new DictionaryBuilder().addAll(d_map.keySet()).buildPerfectHash(false);

            long[] values = new long[d_map.size()];

            int i = 0;
            for (long value : d_map.values())
View Full Code Here

TOP

Related Classes of eu.danieldk.dictomaton.DictionaryBuilder

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.