@Test public void testMatches() throws Exception { JCas jcas = RutaTestUtils.getCAS("Some text.").getJCas(); Assert.assertTrue(Ruta.matches(jcas, "CW # @PERIOD;")); Assert.assertTrue(Ruta.matches(jcas, "W{IS(CW)} \"text\";")); }
public static boolean matches(JCas jcas, String rule, Object... configurationData) throws AnalysisEngineProcessException, ResourceInitializationException { Object[] config = ArrayUtils.addAll(configurationData, RutaEngine.PARAM_DEBUG, true); applyRule(jcas, rule, config); int applies = countRuleApplies(jcas); removeDebugInformation(jcas); return applies > 0; }
Ruta { public static boolean matches(JCas jcas, String rule, Object... configurationData) throws AnalysisEngineProcessException, ResourceInitializationException { Object[] config = ArrayUtils.addAll(configurationData, RutaEngine.PARAM_DEBUG, true); applyRule(jcas, rule, config); int applies = countRuleApplies(jcas); removeDebugInformation(jcas); return applies > 0; } }
Ruta { public static boolean matches(JCas jcas, String rule, Object... configurationData) throws AnalysisEngineProcessException, ResourceInitializationException { Object[] config = ArrayUtils.addAll(configurationData, RutaEngine.PARAM_DEBUG, true); applyRule(jcas, rule, config); int applies = countRuleApplies(jcas); removeDebugInformation(jcas); return applies > 0; }  }
Ruta { public static boolean matches(JCas jcas, String rule, Object... configurationData) throws AnalysisEngineProcessException, ResourceInitializationException { Object[] config = ArrayUtils.addAll(configurationData, RutaEngine.PARAM_DEBUG, true); applyRule(jcas, rule, config); int applies = countRuleApplies(jcas); removeDebugInformation(jcas); return applies > 0; }  static void applyRule(JCas jcas, String rule, Object... configurationData); static void apply(CAS cas, String script, Map<String, Object> parameters); static void apply(CAS cas, String script); static void removeDebugInformation(JCas jcas); static String inject(String script, String placeholder, int[] addresses); static String inject(String script, FeatureStructureImpl... annotations); static List<Annotation> select(JCas jcas, String rule, Object... configurationData); static boolean matches(JCas jcas, String rule, Object... configurationData); static AnalysisEngine wrapAnalysisEngine(URL descriptorUrl, String viewName,
          ResourceManager resourceManager); static AnalysisEngine wrapAnalysisEngine(URL descriptorUrl, String viewName,
          boolean rutaEngine, String encoding, ResourceManager resourceManager); @Deprecated static AnalysisEngineDescription createAnalysisEngineDescription(String script); @Deprecated static AnalysisEngineDescription createAnalysisEngineDescription(String script,
          TypeSystemDescription... tsds); }
Ruta { public static boolean matches(JCas jcas, String rule, Object... configurationData) throws AnalysisEngineProcessException, ResourceInitializationException { Object[] config = ArrayUtils.addAll(configurationData, RutaEngine.PARAM_DEBUG, true); applyRule(jcas, rule, config); int applies = countRuleApplies(jcas); removeDebugInformation(jcas); return applies > 0; }  static void applyRule(JCas jcas, String rule, Object... configurationData); static void apply(CAS cas, String script, Map<String, Object> parameters); static void apply(CAS cas, String script); static void removeDebugInformation(JCas jcas); static String inject(String script, String placeholder, int[] addresses); static String inject(String script, FeatureStructureImpl... annotations); static List<Annotation> select(JCas jcas, String rule, Object... configurationData); static boolean matches(JCas jcas, String rule, Object... configurationData); static AnalysisEngine wrapAnalysisEngine(URL descriptorUrl, String viewName,
          ResourceManager resourceManager); static AnalysisEngine wrapAnalysisEngine(URL descriptorUrl, String viewName,
          boolean rutaEngine, String encoding, ResourceManager resourceManager); @Deprecated static AnalysisEngineDescription createAnalysisEngineDescription(String script); @Deprecated static AnalysisEngineDescription createAnalysisEngineDescription(String script,
          TypeSystemDescription... tsds);  }