Examples of PatternNodeImpl


Examples of edu.harvard.wcfia.yoshikoder.dictionary.PatternNodeImpl

                yoshikoder.getDictionary().getPatternEngine()
                .makeRegexp(name.getText());
           
            Double d = getScore();
            PatternNode node =
                new PatternNodeImpl(name.getText(), d, p);
            if (!node.equals(nodeToEdit)){
                yoshikoder.replaceNode(nodeToEdit, node);
                yoshikoder.setSelectedNode(node);
                yoshikoder.setUnsavedChanges(true);
            }
        } catch (Exception ex){
View Full Code Here

Examples of edu.harvard.wcfia.yoshikoder.dictionary.PatternNodeImpl

              p[ii] = yoshikoder.getDictionary().getPatternEngine().makeRegexp(spl[ii]);
              System.out.println(p[ii].toString());
            }
           
            Double d = getScore();
            PatternNode node = new PatternNodeImpl(newname, d, p);
           
            yoshikoder.getDictionary().addPattern(node, parent);
            yoshikoder.setSelectedNode(parent);
            yoshikoder.setUnsavedChanges(true);
           
View Full Code Here

Examples of edu.harvard.wcfia.yoshikoder.dictionary.PatternNodeImpl

              String[] spl = name.split(" ");
                Pattern[] p = new Pattern[spl.length];
                engine = dict.getPatternEngine();
                for (int ii = 0; ii < spl.length; ii++)
          p[ii] = engine.makeRegexp(spl[ii]);
              pn = new PatternNodeImpl(name, d, p);
           
            } catch (PatternSyntaxException pse){
                throw new SAXException(pse);
            }
            try {
View Full Code Here

Examples of edu.harvard.wcfia.yoshikoder.dictionary.PatternNodeImpl

            }
            stack.push(newcat);
            inPattern = false;
            
        } else if (qName.equals("pattern")){ //$NON-NLS-1$
            PatternNode newpat = new PatternNodeImpl("Nameless"); //$NON-NLS-1$
            CategoryNode cparent = (CategoryNode)stack.peek();
            try {
                dict.addPattern(newpat, cparent);
            } catch (DuplicateException de){
                throw new SAXException(de);
View Full Code Here

Examples of edu.harvard.wcfia.yoshikoder.dictionary.PatternNodeImpl

              // deal with multi-patterns here
              String[] spl = name.split(" ");
                Pattern[] p = new Pattern[spl.length];
                for (int ii = 0; ii < spl.length; ii++)
          p[ii] = engine.makeRegexp(spl[ii]);
              pn = new PatternNodeImpl(name, d, p);
           
            } catch (PatternSyntaxException pse){
                throw new SAXException(pse);
            }
            try {
View Full Code Here

Examples of edu.harvard.wcfia.yoshikoder.dictionary.PatternNodeImpl

                    // no need to fix these for a SubString match-using dictionary
                    //String fixed = fixVBProWildcards(trimmed);
                    try {
                        Pattern regexp = rengine.makeRegexp(trimmed);
                        PatternNode pattern =
                            new PatternNodeImpl(trimmed, null, regexp);
                        dict.addPattern(pattern, cat);
                    } catch (DuplicateException de){
                        errors.add(new BadPattern(lineNumber, trimmed, true));
                    } catch (Exception re) {
                        errors.add(new BadPattern(lineNumber, trimmed, false));
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.