Examples of DictionaryBuilder


Examples of com.facebook.presto.block.dictionary.Dictionary.DictionaryBuilder

            @Override
            public Tuple apply(Tuple tuple)
            {
                if (tupleInfo == null) {
                    tupleInfo = tuple.getTupleInfo();
                    dictionaryBuilder = new DictionaryBuilder(tupleInfo);
                }

                long id = dictionaryBuilder.getId(tuple);
                return createTuple(id);
            }
View Full Code Here

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

Examples of eu.danieldk.dictomaton.DictionaryBuilder

        private final DictionaryBuilder dictionaryBuilder;

        private final ArrayList<Float> values;

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

Examples of eu.danieldk.dictomaton.DictionaryBuilder

        /**
         * 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

Examples of eu.danieldk.dictomaton.DictionaryBuilder

        private final DictionaryBuilder dictionaryBuilder;

        private final ArrayList<Byte> values;

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

Examples of eu.danieldk.dictomaton.DictionaryBuilder

            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

Examples of eu.danieldk.dictomaton.DictionaryBuilder

        /**
         * 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

Examples of eu.danieldk.dictomaton.DictionaryBuilder

        private final DictionaryBuilder dictionaryBuilder;

        private final ArrayList<Integer> values;

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

Examples of eu.danieldk.dictomaton.DictionaryBuilder

        /**
         * 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

Examples of eu.danieldk.dictomaton.DictionaryBuilder

        private final DictionaryBuilder dictionaryBuilder;

        private final ArrayList<Boolean> values;

        public OrderedBuilder() {
            this.dictionaryBuilder = new DictionaryBuilder();
            this.values = new ArrayList<Boolean>();
        }
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.