View Javadoc

1   package uk.ac.ebi.intenz.tools.sib.translator.rules;
2   
3   /**
4    * This interface defines the mandatory method for all <code>RuleGroup</code> implementations.
5    *
6    * A rule group is a set of regular expression rules to translate text.
7    *
8    * @author Michael Darsow
9    * @version $Revision: 1.2 $ $Date: 2008/11/11 12:01:24 $
10   */
11  public interface RuleGroup {
12    /**
13     * Implementations of this interface must implement this method to translate text based on rules.
14     *
15     * @param text The text to be translated.
16     * @return the translated text.
17     */
18    public String applyRules(String text);
19  
20    /**
21     * This method can be used to reverse the rules which have been applied in {@link RuleGroup#applyRules(String)}.
22     *
23     * @param text The text to be translated.
24     * @return the translated text.
25     */
26    public String reverseRules(String text);
27  }