示例#1
0
        /**
         * @param character the input character we want matches for
         * @param searchTraditional true if traditional characters should included in results
         * @param searchSimplified true if simplified characters should be included in results
         * @param looseness matching looseness, 0-1
         * @param numMatches number of matches to return
         * @param strokesDataSource the dat source
         */
        public StrokesMatcher(CharacterDescriptor character,
                                bool searchTraditional,
                                bool searchSimplified,
                                double looseness,
                                int numMatches,
                                StrokesDataSource strokesDataSource)
        {
            this.inputCharacter = character;
            this.compareTo = new CharacterDescriptor();

            this.searchTraditional = searchTraditional;
            this.searchSimplified = searchSimplified;

            this.looseness = looseness;

            this.running = true;
            this.strokesDataSource = strokesDataSource;

            this.matches = new CharacterMatchCollector(numMatches);
            this.initScoreMatrix();
        }
示例#2
0
        /**
         * @param character the input character we want matches for
         * @param searchTraditional true if traditional characters should included in results
         * @param searchSimplified true if simplified characters should be included in results
         * @param looseness matching looseness, 0-1
         * @param numMatches number of matches to return
         * @param strokesDataSource the dat source
         */
        public StrokesMatcher(CharacterDescriptor character,
                              bool searchTraditional,
                              bool searchSimplified,
                              double looseness,
                              int numMatches,
                              StrokesDataSource strokesDataSource)
        {
            this.inputCharacter = character;
            this.compareTo      = new CharacterDescriptor();

            this.searchTraditional = searchTraditional;
            this.searchSimplified  = searchSimplified;

            this.looseness = looseness;

            this.running           = true;
            this.strokesDataSource = strokesDataSource;

            this.matches = new CharacterMatchCollector(numMatches);
            this.initScoreMatrix();
        }