You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ctakes.apache.org by ja...@apache.org on 2012/10/31 06:26:55 UTC
svn commit: r1403989 [10/28] - in /incubator/ctakes/branches/SHARPn-cTAKES:
Constituency Parser/src/org/chboston/cnlp/ctakes/parser/ Constituency
Parser/src/org/chboston/cnlp/ctakes/parser/uima/ae/ Constituency
Parser/src/org/chboston/cnlp/ctakes/parse...
Modified: incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/machine/StatusIndicatorFSM.java
URL: http://svn.apache.org/viewvc/incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/machine/StatusIndicatorFSM.java?rev=1403989&r1=1403988&r2=1403989&view=diff
==============================================================================
--- incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/machine/StatusIndicatorFSM.java (original)
+++ incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/machine/StatusIndicatorFSM.java Wed Oct 31 05:26:43 2012
@@ -1,18 +1,11 @@
/*
- * Copyright: (c) 2009 Mayo Foundation for Medical Education and
- * Research (MFMER). All rights reserved. MAYO, MAYO CLINIC, and the
- * triple-shield Mayo logo are trademarks and service marks of MFMER.
- *
- * Except as contained in the copyright notice above, or as used to identify
- * MFMER as the author of this software, the trade names, trademarks, service
- * marks, or product names of the copyright holder shall not be used in
- * advertising, promotion or otherwise in connection with this software without
- * prior written authorization of the copyright holder.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@@ -21,283 +14,283 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package edu.mayo.bmi.fsm.machine;
-
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import net.openai.util.fsm.AnyCondition;
-import net.openai.util.fsm.Condition;
-import net.openai.util.fsm.Machine;
-import net.openai.util.fsm.State;
-import edu.mayo.bmi.fsm.condition.TextSetCondition;
-import edu.mayo.bmi.fsm.condition.TextValueCondition;
-import edu.mayo.bmi.fsm.output.StatusIndicator;
-import edu.mayo.bmi.fsm.state.NamedState;
-import edu.mayo.bmi.fsm.state.NonTerminalEndState;
-import edu.mayo.bmi.fsm.token.BaseToken;
-import edu.mayo.bmi.fsm.token.TextToken;
-
-/**
- * Uses one or more finite state machines to detect indications of
- * <br>family history of
- * <br>history of
- * <br>possible/probable/likely
- *
- * @author Mayo Clinic
- */
-public class StatusIndicatorFSM
-{
- private Set<String> iv_probableSet = new HashSet<String>();
- private Set<String> iv_historySet = new HashSet<String>();
- private Set<String> iv_familyHistorySet = new HashSet<String>();
-
- // contains the finite state machines
- private Machine iv_probableMachine;
- private Machine iv_historyMachine;
- private Machine iv_familyHistoryMachine;
- private Set<Machine> iv_machineSet = new HashSet<Machine>();
-
- /**
- *
- * Constructor
- *
- */
- public StatusIndicatorFSM()
- {
- iv_probableSet.add("possible");
- iv_probableSet.add("possibly");
- iv_probableSet.add("probable");
- iv_probableSet.add("likely");
-
- iv_historySet.add("hx");
- iv_historySet.add("history");
-
- iv_familyHistorySet.add("fx");
- iv_familyHistorySet.add("fh");
-
- iv_historyMachine = getHistoryMachine();
- iv_probableMachine = getProbableMachine();
- iv_familyHistoryMachine = getFamilyHistoryMachine();
- iv_machineSet.add(iv_historyMachine);
- iv_machineSet.add(iv_probableMachine);
- iv_machineSet.add(iv_familyHistoryMachine);
- }
-
- /**
- * Gets a finite state machine that detects the following:
- * <ol>
- * <li>probable</li>
- * <li>probably</li>
- * <li>likely</li>
- * </ol>
- *
- * @return
- */
- private Machine getProbableMachine()
- {
- State startState = new NamedState("START");
- State endState = new NamedState("END");
-
- endState.setEndStateFlag(true);
-
- Machine m = new Machine(startState);
-
- Condition probableC = new TextSetCondition(iv_probableSet, false);
-
- startState.addTransition(probableC, endState);
- startState.addTransition(new AnyCondition(), startState);
-
- endState.addTransition(new AnyCondition(), startState);
-
- return m;
- }
-
- /**
- * Gets a finite state machine that detects the following:
- * <ol>
- * <li>history</li>
- * <li>hx</li>
- * <li>h/o</li>
- * </ol>
- *
- * @return
- */
- private Machine getHistoryMachine()
- {
- State startState = new NamedState("START");
- State endState = new NamedState("END");
-
- // for case h/o
- State hAbbrState = new NamedState("HISTORY_ABBR");
- State fslashState = new NamedState("FORWARD_SLASH");
-
- endState.setEndStateFlag(true);
-
- Machine m = new Machine(startState);
-
- Condition historyC = new TextSetCondition(iv_historySet, false);
-
- startState.addTransition(historyC, endState);
- startState
- .addTransition(new TextValueCondition("h", false), hAbbrState);
- startState.addTransition(new AnyCondition(), startState);
-
- hAbbrState.addTransition(
- new TextValueCondition("/", false),
- fslashState);
- hAbbrState.addTransition(new AnyCondition(), startState);
-
- fslashState.addTransition(new TextValueCondition("o", false), endState);
- fslashState.addTransition(new AnyCondition(), startState);
-
- endState.addTransition(new AnyCondition(), startState);
-
- return m;
- }
-
- /**
- * Gets a finite state machine that detects the following:
- * <ol>
- * <li>fh</li>
- * <li>fx</li>
- * <li>family history</li>
- * </ol>
- *
- * @return
- */
- private Machine getFamilyHistoryMachine()
- {
- State startState = new NamedState("START");
- State endState = new NamedState("END");
-
- // for case h/o
- State familyState = new NamedState("FAMILY");
-
- endState.setEndStateFlag(true);
-
- Machine m = new Machine(startState);
-
- Condition familyHistoryC = new TextSetCondition(
- iv_familyHistorySet,
- false);
-
- startState.addTransition(familyHistoryC, endState);
- startState.addTransition(
- new TextValueCondition("family", false),
- familyState);
- startState.addTransition(new AnyCondition(), startState);
-
- familyState.addTransition(
- new TextValueCondition("history", false),
- endState);
- familyState.addTransition(new AnyCondition(), startState);
-
- endState.addTransition(new AnyCondition(), startState);
-
- return m;
- }
-
- /**
- * Executes the finite state machines.
- *
- * @param tokens
- * @return Set of DateToken objects.
- * @throws Exception
- */
- public Set<StatusIndicator> execute(List<TextToken> tokens) throws Exception
- {
- Set<StatusIndicator> outSet = new HashSet<StatusIndicator>();
-
- // maps a fsm to a token start index
- // key = Machine , value = token start index
- Map<Machine, Integer> tokenStartMap = new HashMap<Machine, Integer>();
-
- for (int i = 0; i < tokens.size(); i++)
- {
- BaseToken token = tokens.get(i);
-
- Iterator<Machine> machineItr = iv_machineSet.iterator();
- while (machineItr.hasNext())
- {
- Machine m = machineItr.next();
-
- m.input(token);
-
- State currentState = m.getCurrentState();
- if (currentState.getStartStateFlag())
- {
- tokenStartMap.put(m, new Integer(i));
- }
- if (currentState.getEndStateFlag())
- {
- Object o = tokenStartMap.get(m);
- int tokenStartIndex;
- if (o == null)
- {
- // By default, all machines start with token zero.
- tokenStartIndex = 0;
- }
- else
- {
- tokenStartIndex = ((Integer) o).intValue();
- // skip ahead over single token we don't want
- tokenStartIndex++;
- }
- BaseToken endToken = null;
- if (currentState instanceof NonTerminalEndState)
- {
- endToken = tokens.get(i - 1);
- }
- else
- {
- endToken = token;
- }
-
- BaseToken startToken = tokens.get(tokenStartIndex);
- StatusIndicator si = null;
- if (m.equals(iv_historyMachine))
- {
- si = new StatusIndicator(
- startToken.getStartOffset(),
- endToken.getEndOffset(),
- StatusIndicator.HISTORY_STATUS);
- }
- else if (m.equals(iv_probableMachine))
- {
- si = new StatusIndicator(
- startToken.getStartOffset(),
- endToken.getEndOffset(),
- StatusIndicator.PROBABLE_STATUS);
- }
- else if (m.equals(iv_familyHistoryMachine))
- {
- si = new StatusIndicator(
- startToken.getStartOffset(),
- endToken.getEndOffset(),
- StatusIndicator.FAMILY_HISTORY_STATUS);
- }
- outSet.add(si);
- m.reset();
- }
- }
- }
-
- // cleanup
- tokenStartMap.clear();
-
- // reset machines
- Iterator<Machine> itr = iv_machineSet.iterator();
- while (itr.hasNext())
- {
- Machine m = itr.next();
- m.reset();
- }
-
- return outSet;
- }
-}
\ No newline at end of file
+package edu.mayo.bmi.fsm.machine;
+
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import net.openai.util.fsm.AnyCondition;
+import net.openai.util.fsm.Condition;
+import net.openai.util.fsm.Machine;
+import net.openai.util.fsm.State;
+import edu.mayo.bmi.fsm.condition.TextSetCondition;
+import edu.mayo.bmi.fsm.condition.TextValueCondition;
+import edu.mayo.bmi.fsm.output.StatusIndicator;
+import edu.mayo.bmi.fsm.state.NamedState;
+import edu.mayo.bmi.fsm.state.NonTerminalEndState;
+import edu.mayo.bmi.fsm.token.BaseToken;
+import edu.mayo.bmi.fsm.token.TextToken;
+
+/**
+ * Uses one or more finite state machines to detect indications of
+ * <br>family history of
+ * <br>history of
+ * <br>possible/probable/likely
+ *
+ * @author Mayo Clinic
+ */
+public class StatusIndicatorFSM
+{
+ private Set<String> iv_probableSet = new HashSet<String>();
+ private Set<String> iv_historySet = new HashSet<String>();
+ private Set<String> iv_familyHistorySet = new HashSet<String>();
+
+ // contains the finite state machines
+ private Machine iv_probableMachine;
+ private Machine iv_historyMachine;
+ private Machine iv_familyHistoryMachine;
+ private Set<Machine> iv_machineSet = new HashSet<Machine>();
+
+ /**
+ *
+ * Constructor
+ *
+ */
+ public StatusIndicatorFSM()
+ {
+ iv_probableSet.add("possible");
+ iv_probableSet.add("possibly");
+ iv_probableSet.add("probable");
+ iv_probableSet.add("likely");
+
+ iv_historySet.add("hx");
+ iv_historySet.add("history");
+
+ iv_familyHistorySet.add("fx");
+ iv_familyHistorySet.add("fh");
+
+ iv_historyMachine = getHistoryMachine();
+ iv_probableMachine = getProbableMachine();
+ iv_familyHistoryMachine = getFamilyHistoryMachine();
+ iv_machineSet.add(iv_historyMachine);
+ iv_machineSet.add(iv_probableMachine);
+ iv_machineSet.add(iv_familyHistoryMachine);
+ }
+
+ /**
+ * Gets a finite state machine that detects the following:
+ * <ol>
+ * <li>probable</li>
+ * <li>probably</li>
+ * <li>likely</li>
+ * </ol>
+ *
+ * @return
+ */
+ private Machine getProbableMachine()
+ {
+ State startState = new NamedState("START");
+ State endState = new NamedState("END");
+
+ endState.setEndStateFlag(true);
+
+ Machine m = new Machine(startState);
+
+ Condition probableC = new TextSetCondition(iv_probableSet, false);
+
+ startState.addTransition(probableC, endState);
+ startState.addTransition(new AnyCondition(), startState);
+
+ endState.addTransition(new AnyCondition(), startState);
+
+ return m;
+ }
+
+ /**
+ * Gets a finite state machine that detects the following:
+ * <ol>
+ * <li>history</li>
+ * <li>hx</li>
+ * <li>h/o</li>
+ * </ol>
+ *
+ * @return
+ */
+ private Machine getHistoryMachine()
+ {
+ State startState = new NamedState("START");
+ State endState = new NamedState("END");
+
+ // for case h/o
+ State hAbbrState = new NamedState("HISTORY_ABBR");
+ State fslashState = new NamedState("FORWARD_SLASH");
+
+ endState.setEndStateFlag(true);
+
+ Machine m = new Machine(startState);
+
+ Condition historyC = new TextSetCondition(iv_historySet, false);
+
+ startState.addTransition(historyC, endState);
+ startState
+ .addTransition(new TextValueCondition("h", false), hAbbrState);
+ startState.addTransition(new AnyCondition(), startState);
+
+ hAbbrState.addTransition(
+ new TextValueCondition("/", false),
+ fslashState);
+ hAbbrState.addTransition(new AnyCondition(), startState);
+
+ fslashState.addTransition(new TextValueCondition("o", false), endState);
+ fslashState.addTransition(new AnyCondition(), startState);
+
+ endState.addTransition(new AnyCondition(), startState);
+
+ return m;
+ }
+
+ /**
+ * Gets a finite state machine that detects the following:
+ * <ol>
+ * <li>fh</li>
+ * <li>fx</li>
+ * <li>family history</li>
+ * </ol>
+ *
+ * @return
+ */
+ private Machine getFamilyHistoryMachine()
+ {
+ State startState = new NamedState("START");
+ State endState = new NamedState("END");
+
+ // for case h/o
+ State familyState = new NamedState("FAMILY");
+
+ endState.setEndStateFlag(true);
+
+ Machine m = new Machine(startState);
+
+ Condition familyHistoryC = new TextSetCondition(
+ iv_familyHistorySet,
+ false);
+
+ startState.addTransition(familyHistoryC, endState);
+ startState.addTransition(
+ new TextValueCondition("family", false),
+ familyState);
+ startState.addTransition(new AnyCondition(), startState);
+
+ familyState.addTransition(
+ new TextValueCondition("history", false),
+ endState);
+ familyState.addTransition(new AnyCondition(), startState);
+
+ endState.addTransition(new AnyCondition(), startState);
+
+ return m;
+ }
+
+ /**
+ * Executes the finite state machines.
+ *
+ * @param tokens
+ * @return Set of DateToken objects.
+ * @throws Exception
+ */
+ public Set<StatusIndicator> execute(List<TextToken> tokens) throws Exception
+ {
+ Set<StatusIndicator> outSet = new HashSet<StatusIndicator>();
+
+ // maps a fsm to a token start index
+ // key = Machine , value = token start index
+ Map<Machine, Integer> tokenStartMap = new HashMap<Machine, Integer>();
+
+ for (int i = 0; i < tokens.size(); i++)
+ {
+ BaseToken token = tokens.get(i);
+
+ Iterator<Machine> machineItr = iv_machineSet.iterator();
+ while (machineItr.hasNext())
+ {
+ Machine m = machineItr.next();
+
+ m.input(token);
+
+ State currentState = m.getCurrentState();
+ if (currentState.getStartStateFlag())
+ {
+ tokenStartMap.put(m, new Integer(i));
+ }
+ if (currentState.getEndStateFlag())
+ {
+ Object o = tokenStartMap.get(m);
+ int tokenStartIndex;
+ if (o == null)
+ {
+ // By default, all machines start with token zero.
+ tokenStartIndex = 0;
+ }
+ else
+ {
+ tokenStartIndex = ((Integer) o).intValue();
+ // skip ahead over single token we don't want
+ tokenStartIndex++;
+ }
+ BaseToken endToken = null;
+ if (currentState instanceof NonTerminalEndState)
+ {
+ endToken = tokens.get(i - 1);
+ }
+ else
+ {
+ endToken = token;
+ }
+
+ BaseToken startToken = tokens.get(tokenStartIndex);
+ StatusIndicator si = null;
+ if (m.equals(iv_historyMachine))
+ {
+ si = new StatusIndicator(
+ startToken.getStartOffset(),
+ endToken.getEndOffset(),
+ StatusIndicator.HISTORY_STATUS);
+ }
+ else if (m.equals(iv_probableMachine))
+ {
+ si = new StatusIndicator(
+ startToken.getStartOffset(),
+ endToken.getEndOffset(),
+ StatusIndicator.PROBABLE_STATUS);
+ }
+ else if (m.equals(iv_familyHistoryMachine))
+ {
+ si = new StatusIndicator(
+ startToken.getStartOffset(),
+ endToken.getEndOffset(),
+ StatusIndicator.FAMILY_HISTORY_STATUS);
+ }
+ outSet.add(si);
+ m.reset();
+ }
+ }
+ }
+
+ // cleanup
+ tokenStartMap.clear();
+
+ // reset machines
+ Iterator<Machine> itr = iv_machineSet.iterator();
+ while (itr.hasNext())
+ {
+ Machine m = itr.next();
+ m.reset();
+ }
+
+ return outSet;
+ }
+}
Modified: incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/machine/TimeFSM.java
URL: http://svn.apache.org/viewvc/incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/machine/TimeFSM.java?rev=1403989&r1=1403988&r2=1403989&view=diff
==============================================================================
--- incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/machine/TimeFSM.java (original)
+++ incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/machine/TimeFSM.java Wed Oct 31 05:26:43 2012
@@ -1,18 +1,11 @@
/*
- * Copyright: (c) 2009 Mayo Foundation for Medical Education and
- * Research (MFMER). All rights reserved. MAYO, MAYO CLINIC, and the
- * triple-shield Mayo logo are trademarks and service marks of MFMER.
- *
- * Except as contained in the copyright notice above, or as used to identify
- * MFMER as the author of this software, the trade names, trademarks, service
- * marks, or product names of the copyright holder shall not be used in
- * advertising, promotion or otherwise in connection with this software without
- * prior written authorization of the copyright holder.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@@ -21,173 +14,173 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package edu.mayo.bmi.fsm.machine;
-
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import net.openai.util.fsm.AnyCondition;
-import net.openai.util.fsm.Condition;
-import net.openai.util.fsm.Machine;
-import net.openai.util.fsm.State;
-import edu.mayo.bmi.fsm.condition.DayNightWordCondition;
-import edu.mayo.bmi.fsm.condition.HourMinuteCondition;
-import edu.mayo.bmi.fsm.condition.IntegerRangeCondition;
-import edu.mayo.bmi.fsm.condition.PunctuationValueCondition;
-import edu.mayo.bmi.fsm.condition.WordSetCondition;
-import edu.mayo.bmi.fsm.output.TimeToken;
-import edu.mayo.bmi.fsm.state.NamedState;
-import edu.mayo.bmi.fsm.token.BaseToken;
-
-/**
- * Uses one or more finite state machines to detect times in the given input of
- * tokens.
- *
- * @author Mayo Clinic
- */
-public class TimeFSM {
- // constants
- private final int MIN_MINUTE = 0;
- private final int MAX_MINUTE = 59;
- private final int MIN_HOUR = 1;
- private final int MAX_HOUR = 12;
-
- // Set that consists of AM and PM
- private Set<String> iv_dayNightSet = new HashSet<String>();
-
- // contains the finite state machines
- private Set<Machine> iv_machineSet = new HashSet<Machine>();
-
- /**
- *
- * Constructor
- *
- */
- public TimeFSM() {
- iv_dayNightSet.add("am");
- iv_dayNightSet.add("pm");
-
- iv_machineSet.add(getMachine());
- }
-
- /**
- * Gets a finite state machine that detects the following:
- * <ol>
- * <li>3 PM</li>
- * <li>3 P.M.</li>
- * <li>3:05 PM</li>
- * <li>3:05 P.M.</li>
- * </ol>
- *
- * @return
- */
- private Machine getMachine() {
- State startState = new NamedState("START");
- State endState = new NamedState("END");
- endState.setEndStateFlag(true);
-
- Machine m = new Machine(startState);
-
- State hourNumState = new NamedState("HOUR_NUM");
- State hourMinTextState = new NamedState("HOUR_MIN_TEXT");
- State ampmTextWithPeriodState = new NamedState("AM_PM_PERIOD_TEXT");
-
- Condition hourNumCondition = new IntegerRangeCondition(MIN_HOUR,
- MAX_HOUR);
- Condition hourMinCondition = new HourMinuteCondition(MIN_HOUR,
- MAX_HOUR, MIN_MINUTE, MAX_MINUTE);
- Condition dayNightCondition = new WordSetCondition(iv_dayNightSet,
- false);
- Condition dayNightWithPeriodCondition = new DayNightWordCondition();
- Condition closingPeriodCondition = new PunctuationValueCondition('.');
-
- startState.addTransition(hourNumCondition, hourNumState);
- startState.addTransition(hourMinCondition, hourMinTextState);
- startState.addTransition(new AnyCondition(), startState);
-
- hourMinTextState.addTransition(dayNightCondition, endState);
- hourMinTextState.addTransition(dayNightWithPeriodCondition,
- ampmTextWithPeriodState);
- hourMinTextState.addTransition(new AnyCondition(), startState);
-
- hourNumState.addTransition(dayNightCondition, endState);
- hourNumState.addTransition(dayNightWithPeriodCondition,
- ampmTextWithPeriodState);
- hourNumState.addTransition(new AnyCondition(), startState);
-
- ampmTextWithPeriodState.addTransition(closingPeriodCondition, endState);
- ampmTextWithPeriodState.addTransition(new AnyCondition(), startState);
-
- endState.addTransition(new AnyCondition(), startState);
-
- return m;
- }
-
- /**
- * Executes the finite state machines.
- *
- * @param tokens
- * @return Set of TimeToken objects.
- * @throws Exception
- */
- public Set<TimeToken> execute(List<? extends BaseToken> tokens)
- throws Exception {
- Set<TimeToken> timeSet = new HashSet<TimeToken>();
-
- // maps a fsm to a token start index
- // key = fsm , value = token start index
- Map<Machine, Integer> tokenStartMap = new HashMap<Machine, Integer>();
-
- for (int i = 0; i < tokens.size(); i++) {
- BaseToken token = tokens.get(i);
-
- Iterator<Machine> machineItr = iv_machineSet.iterator();
- while (machineItr.hasNext()) {
- Machine fsm = machineItr.next();
-
- fsm.input(token);
-
- State currentState = fsm.getCurrentState();
- if (currentState.getStartStateFlag()) {
- tokenStartMap.put(fsm, new Integer(i));
- }
- if (currentState.getEndStateFlag()) {
- Object o = tokenStartMap.get(fsm);
- int tokenStartIndex;
- if (o == null) {
- // By default, all machines start with
- // token zero.
- tokenStartIndex = 0;
- } else {
- tokenStartIndex = ((Integer) o).intValue();
- // skip ahead over single token we don't want
- tokenStartIndex++;
- }
- BaseToken startToken = tokens.get(tokenStartIndex);
- BaseToken endToken = token;
- TimeToken timeToken = new TimeToken(startToken
- .getStartOffset(), endToken.getEndOffset());
- timeSet.add(timeToken);
- fsm.reset();
- }
- }
- }
-
- // cleanup
- tokenStartMap.clear();
-
- // reset machines
- Iterator<Machine> itr = iv_machineSet.iterator();
- while (itr.hasNext()) {
- Machine fsm = itr.next();
- fsm.reset();
- }
-
- return timeSet;
- }
-
-}
+package edu.mayo.bmi.fsm.machine;
+
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import net.openai.util.fsm.AnyCondition;
+import net.openai.util.fsm.Condition;
+import net.openai.util.fsm.Machine;
+import net.openai.util.fsm.State;
+import edu.mayo.bmi.fsm.condition.DayNightWordCondition;
+import edu.mayo.bmi.fsm.condition.HourMinuteCondition;
+import edu.mayo.bmi.fsm.condition.IntegerRangeCondition;
+import edu.mayo.bmi.fsm.condition.PunctuationValueCondition;
+import edu.mayo.bmi.fsm.condition.WordSetCondition;
+import edu.mayo.bmi.fsm.output.TimeToken;
+import edu.mayo.bmi.fsm.state.NamedState;
+import edu.mayo.bmi.fsm.token.BaseToken;
+
+/**
+ * Uses one or more finite state machines to detect times in the given input of
+ * tokens.
+ *
+ * @author Mayo Clinic
+ */
+public class TimeFSM {
+ // constants
+ private final int MIN_MINUTE = 0;
+ private final int MAX_MINUTE = 59;
+ private final int MIN_HOUR = 1;
+ private final int MAX_HOUR = 12;
+
+ // Set that consists of AM and PM
+ private Set<String> iv_dayNightSet = new HashSet<String>();
+
+ // contains the finite state machines
+ private Set<Machine> iv_machineSet = new HashSet<Machine>();
+
+ /**
+ *
+ * Constructor
+ *
+ */
+ public TimeFSM() {
+ iv_dayNightSet.add("am");
+ iv_dayNightSet.add("pm");
+
+ iv_machineSet.add(getMachine());
+ }
+
+ /**
+ * Gets a finite state machine that detects the following:
+ * <ol>
+ * <li>3 PM</li>
+ * <li>3 P.M.</li>
+ * <li>3:05 PM</li>
+ * <li>3:05 P.M.</li>
+ * </ol>
+ *
+ * @return
+ */
+ private Machine getMachine() {
+ State startState = new NamedState("START");
+ State endState = new NamedState("END");
+ endState.setEndStateFlag(true);
+
+ Machine m = new Machine(startState);
+
+ State hourNumState = new NamedState("HOUR_NUM");
+ State hourMinTextState = new NamedState("HOUR_MIN_TEXT");
+ State ampmTextWithPeriodState = new NamedState("AM_PM_PERIOD_TEXT");
+
+ Condition hourNumCondition = new IntegerRangeCondition(MIN_HOUR,
+ MAX_HOUR);
+ Condition hourMinCondition = new HourMinuteCondition(MIN_HOUR,
+ MAX_HOUR, MIN_MINUTE, MAX_MINUTE);
+ Condition dayNightCondition = new WordSetCondition(iv_dayNightSet,
+ false);
+ Condition dayNightWithPeriodCondition = new DayNightWordCondition();
+ Condition closingPeriodCondition = new PunctuationValueCondition('.');
+
+ startState.addTransition(hourNumCondition, hourNumState);
+ startState.addTransition(hourMinCondition, hourMinTextState);
+ startState.addTransition(new AnyCondition(), startState);
+
+ hourMinTextState.addTransition(dayNightCondition, endState);
+ hourMinTextState.addTransition(dayNightWithPeriodCondition,
+ ampmTextWithPeriodState);
+ hourMinTextState.addTransition(new AnyCondition(), startState);
+
+ hourNumState.addTransition(dayNightCondition, endState);
+ hourNumState.addTransition(dayNightWithPeriodCondition,
+ ampmTextWithPeriodState);
+ hourNumState.addTransition(new AnyCondition(), startState);
+
+ ampmTextWithPeriodState.addTransition(closingPeriodCondition, endState);
+ ampmTextWithPeriodState.addTransition(new AnyCondition(), startState);
+
+ endState.addTransition(new AnyCondition(), startState);
+
+ return m;
+ }
+
+ /**
+ * Executes the finite state machines.
+ *
+ * @param tokens
+ * @return Set of TimeToken objects.
+ * @throws Exception
+ */
+ public Set<TimeToken> execute(List<? extends BaseToken> tokens)
+ throws Exception {
+ Set<TimeToken> timeSet = new HashSet<TimeToken>();
+
+ // maps a fsm to a token start index
+ // key = fsm , value = token start index
+ Map<Machine, Integer> tokenStartMap = new HashMap<Machine, Integer>();
+
+ for (int i = 0; i < tokens.size(); i++) {
+ BaseToken token = tokens.get(i);
+
+ Iterator<Machine> machineItr = iv_machineSet.iterator();
+ while (machineItr.hasNext()) {
+ Machine fsm = machineItr.next();
+
+ fsm.input(token);
+
+ State currentState = fsm.getCurrentState();
+ if (currentState.getStartStateFlag()) {
+ tokenStartMap.put(fsm, new Integer(i));
+ }
+ if (currentState.getEndStateFlag()) {
+ Object o = tokenStartMap.get(fsm);
+ int tokenStartIndex;
+ if (o == null) {
+ // By default, all machines start with
+ // token zero.
+ tokenStartIndex = 0;
+ } else {
+ tokenStartIndex = ((Integer) o).intValue();
+ // skip ahead over single token we don't want
+ tokenStartIndex++;
+ }
+ BaseToken startToken = tokens.get(tokenStartIndex);
+ BaseToken endToken = token;
+ TimeToken timeToken = new TimeToken(startToken
+ .getStartOffset(), endToken.getEndOffset());
+ timeSet.add(timeToken);
+ fsm.reset();
+ }
+ }
+ }
+
+ // cleanup
+ tokenStartMap.clear();
+
+ // reset machines
+ Iterator<Machine> itr = iv_machineSet.iterator();
+ while (itr.hasNext()) {
+ Machine fsm = itr.next();
+ fsm.reset();
+ }
+
+ return timeSet;
+ }
+
+}
Modified: incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/output/BaseTokenImpl.java
URL: http://svn.apache.org/viewvc/incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/output/BaseTokenImpl.java?rev=1403989&r1=1403988&r2=1403989&view=diff
==============================================================================
--- incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/output/BaseTokenImpl.java (original)
+++ incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/output/BaseTokenImpl.java Wed Oct 31 05:26:43 2012
@@ -1,18 +1,11 @@
/*
- * Copyright: (c) 2009 Mayo Foundation for Medical Education and
- * Research (MFMER). All rights reserved. MAYO, MAYO CLINIC, and the
- * triple-shield Mayo logo are trademarks and service marks of MFMER.
- *
- * Except as contained in the copyright notice above, or as used to identify
- * MFMER as the author of this software, the trade names, trademarks, service
- * marks, or product names of the copyright holder shall not be used in
- * advertising, promotion or otherwise in connection with this software without
- * prior written authorization of the copyright holder.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@@ -21,25 +14,25 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package edu.mayo.bmi.fsm.output;
-
-import edu.mayo.bmi.fsm.token.BaseToken;
-
-public class BaseTokenImpl implements BaseToken {
- private int iv_startOffset;
- private int iv_endOffset;
-
- public BaseTokenImpl(int startOffset, int endOffset) {
- iv_startOffset = startOffset;
- iv_endOffset = endOffset;
- }
-
- public int getStartOffset() {
- return iv_startOffset;
- }
-
- public int getEndOffset() {
- return iv_endOffset;
- }
-
-}
+package edu.mayo.bmi.fsm.output;
+
+import edu.mayo.bmi.fsm.token.BaseToken;
+
+public class BaseTokenImpl implements BaseToken {
+ private int iv_startOffset;
+ private int iv_endOffset;
+
+ public BaseTokenImpl(int startOffset, int endOffset) {
+ iv_startOffset = startOffset;
+ iv_endOffset = endOffset;
+ }
+
+ public int getStartOffset() {
+ return iv_startOffset;
+ }
+
+ public int getEndOffset() {
+ return iv_endOffset;
+ }
+
+}
Modified: incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/output/DateToken.java
URL: http://svn.apache.org/viewvc/incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/output/DateToken.java?rev=1403989&r1=1403988&r2=1403989&view=diff
==============================================================================
--- incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/output/DateToken.java (original)
+++ incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/output/DateToken.java Wed Oct 31 05:26:43 2012
@@ -1,18 +1,11 @@
/*
- * Copyright: (c) 2009 Mayo Foundation for Medical Education and
- * Research (MFMER). All rights reserved. MAYO, MAYO CLINIC, and the
- * triple-shield Mayo logo are trademarks and service marks of MFMER.
- *
- * Except as contained in the copyright notice above, or as used to identify
- * MFMER as the author of this software, the trade names, trademarks, service
- * marks, or product names of the copyright holder shall not be used in
- * advertising, promotion or otherwise in connection with this software without
- * prior written authorization of the copyright holder.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@@ -21,15 +14,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package edu.mayo.bmi.fsm.output;
-
-/**
- *
- * @author Mayo Clinic
- */
-public class DateToken extends BaseTokenImpl {
-
- public DateToken(int startOffset, int endOffset) {
- super(startOffset, endOffset);
- }
-}
+package edu.mayo.bmi.fsm.output;
+
+/**
+ *
+ * @author Mayo Clinic
+ */
+public class DateToken extends BaseTokenImpl {
+
+ public DateToken(int startOffset, int endOffset) {
+ super(startOffset, endOffset);
+ }
+}
Modified: incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/output/FractionToken.java
URL: http://svn.apache.org/viewvc/incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/output/FractionToken.java?rev=1403989&r1=1403988&r2=1403989&view=diff
==============================================================================
--- incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/output/FractionToken.java (original)
+++ incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/output/FractionToken.java Wed Oct 31 05:26:43 2012
@@ -1,18 +1,11 @@
/*
- * Copyright: (c) 2009 Mayo Foundation for Medical Education and
- * Research (MFMER). All rights reserved. MAYO, MAYO CLINIC, and the
- * triple-shield Mayo logo are trademarks and service marks of MFMER.
- *
- * Except as contained in the copyright notice above, or as used to identify
- * MFMER as the author of this software, the trade names, trademarks, service
- * marks, or product names of the copyright holder shall not be used in
- * advertising, promotion or otherwise in connection with this software without
- * prior written authorization of the copyright holder.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@@ -21,16 +14,16 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package edu.mayo.bmi.fsm.output;
-
-/**
- *
- * @author Mayo Clinic
- */
-public class FractionToken extends BaseTokenImpl {
-
- public FractionToken(int startOffset, int endOffset) {
- super(startOffset, endOffset);
- }
-
-}
+package edu.mayo.bmi.fsm.output;
+
+/**
+ *
+ * @author Mayo Clinic
+ */
+public class FractionToken extends BaseTokenImpl {
+
+ public FractionToken(int startOffset, int endOffset) {
+ super(startOffset, endOffset);
+ }
+
+}
Modified: incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/output/MeasurementToken.java
URL: http://svn.apache.org/viewvc/incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/output/MeasurementToken.java?rev=1403989&r1=1403988&r2=1403989&view=diff
==============================================================================
--- incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/output/MeasurementToken.java (original)
+++ incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/output/MeasurementToken.java Wed Oct 31 05:26:43 2012
@@ -1,18 +1,11 @@
/*
- * Copyright: (c) 2009 Mayo Foundation for Medical Education and
- * Research (MFMER). All rights reserved. MAYO, MAYO CLINIC, and the
- * triple-shield Mayo logo are trademarks and service marks of MFMER.
- *
- * Except as contained in the copyright notice above, or as used to identify
- * MFMER as the author of this software, the trade names, trademarks, service
- * marks, or product names of the copyright holder shall not be used in
- * advertising, promotion or otherwise in connection with this software without
- * prior written authorization of the copyright holder.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@@ -21,16 +14,16 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package edu.mayo.bmi.fsm.output;
-
-/**
- *
- * @author Mayo Clinic
- */
-public class MeasurementToken extends BaseTokenImpl {
-
- public MeasurementToken(int startOffset, int endOffset) {
- super(startOffset, endOffset);
- }
-
-}
+package edu.mayo.bmi.fsm.output;
+
+/**
+ *
+ * @author Mayo Clinic
+ */
+public class MeasurementToken extends BaseTokenImpl {
+
+ public MeasurementToken(int startOffset, int endOffset) {
+ super(startOffset, endOffset);
+ }
+
+}
Modified: incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/output/NegationIndicator.java
URL: http://svn.apache.org/viewvc/incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/output/NegationIndicator.java?rev=1403989&r1=1403988&r2=1403989&view=diff
==============================================================================
--- incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/output/NegationIndicator.java (original)
+++ incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/output/NegationIndicator.java Wed Oct 31 05:26:43 2012
@@ -1,18 +1,11 @@
/*
- * Copyright: (c) 2009 Mayo Foundation for Medical Education and
- * Research (MFMER). All rights reserved. MAYO, MAYO CLINIC, and the
- * triple-shield Mayo logo are trademarks and service marks of MFMER.
- *
- * Except as contained in the copyright notice above, or as used to identify
- * MFMER as the author of this software, the trade names, trademarks, service
- * marks, or product names of the copyright holder shall not be used in
- * advertising, promotion or otherwise in connection with this software without
- * prior written authorization of the copyright holder.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@@ -21,18 +14,18 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-/*
- * Created on Aug 22, 2005
- *
- */
-package edu.mayo.bmi.fsm.output;
-
-/**
- * @author Mayo Clinic
- *
- */
-public class NegationIndicator extends BaseTokenImpl {
- public NegationIndicator(int start, int end) {
- super(start, end);
- }
-}
+/*
+ * Created on Aug 22, 2005
+ *
+ */
+package edu.mayo.bmi.fsm.output;
+
+/**
+ * @author Mayo Clinic
+ *
+ */
+public class NegationIndicator extends BaseTokenImpl {
+ public NegationIndicator(int start, int end) {
+ super(start, end);
+ }
+}
Modified: incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/output/PersonTitleToken.java
URL: http://svn.apache.org/viewvc/incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/output/PersonTitleToken.java?rev=1403989&r1=1403988&r2=1403989&view=diff
==============================================================================
--- incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/output/PersonTitleToken.java (original)
+++ incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/output/PersonTitleToken.java Wed Oct 31 05:26:43 2012
@@ -1,18 +1,11 @@
/*
- * Copyright: (c) 2009 Mayo Foundation for Medical Education and
- * Research (MFMER). All rights reserved. MAYO, MAYO CLINIC, and the
- * triple-shield Mayo logo are trademarks and service marks of MFMER.
- *
- * Except as contained in the copyright notice above, or as used to identify
- * MFMER as the author of this software, the trade names, trademarks, service
- * marks, or product names of the copyright holder shall not be used in
- * advertising, promotion or otherwise in connection with this software without
- * prior written authorization of the copyright holder.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@@ -21,15 +14,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package edu.mayo.bmi.fsm.output;
-
-/**
- *
- * @author Mayo Clinic
- */
-public class PersonTitleToken extends BaseTokenImpl {
-
- public PersonTitleToken(int startOffset, int endOffset) {
- super(startOffset, endOffset);
- }
-}
+package edu.mayo.bmi.fsm.output;
+
+/**
+ *
+ * @author Mayo Clinic
+ */
+public class PersonTitleToken extends BaseTokenImpl {
+
+ public PersonTitleToken(int startOffset, int endOffset) {
+ super(startOffset, endOffset);
+ }
+}
Modified: incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/output/RangeToken.java
URL: http://svn.apache.org/viewvc/incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/output/RangeToken.java?rev=1403989&r1=1403988&r2=1403989&view=diff
==============================================================================
--- incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/output/RangeToken.java (original)
+++ incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/output/RangeToken.java Wed Oct 31 05:26:43 2012
@@ -1,18 +1,11 @@
/*
- * Copyright: (c) 2009 Mayo Foundation for Medical Education and
- * Research (MFMER). All rights reserved. MAYO, MAYO CLINIC, and the
- * triple-shield Mayo logo are trademarks and service marks of MFMER.
- *
- * Except as contained in the copyright notice above, or as used to identify
- * MFMER as the author of this software, the trade names, trademarks, service
- * marks, or product names of the copyright holder shall not be used in
- * advertising, promotion or otherwise in connection with this software without
- * prior written authorization of the copyright holder.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@@ -21,15 +14,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package edu.mayo.bmi.fsm.output;
-
-/**
- *
- * @author Mayo Clinic
- */
-public class RangeToken extends BaseTokenImpl {
- public RangeToken(int startOffset, int endOffset) {
- super(startOffset, endOffset);
- }
-
-}
+package edu.mayo.bmi.fsm.output;
+
+/**
+ *
+ * @author Mayo Clinic
+ */
+public class RangeToken extends BaseTokenImpl {
+ public RangeToken(int startOffset, int endOffset) {
+ super(startOffset, endOffset);
+ }
+
+}
Modified: incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/output/RomanNumeralToken.java
URL: http://svn.apache.org/viewvc/incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/output/RomanNumeralToken.java?rev=1403989&r1=1403988&r2=1403989&view=diff
==============================================================================
--- incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/output/RomanNumeralToken.java (original)
+++ incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/output/RomanNumeralToken.java Wed Oct 31 05:26:43 2012
@@ -1,18 +1,11 @@
/*
- * Copyright: (c) 2009 Mayo Foundation for Medical Education and
- * Research (MFMER). All rights reserved. MAYO, MAYO CLINIC, and the
- * triple-shield Mayo logo are trademarks and service marks of MFMER.
- *
- * Except as contained in the copyright notice above, or as used to identify
- * MFMER as the author of this software, the trade names, trademarks, service
- * marks, or product names of the copyright holder shall not be used in
- * advertising, promotion or otherwise in connection with this software without
- * prior written authorization of the copyright holder.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@@ -21,16 +14,16 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package edu.mayo.bmi.fsm.output;
-
-/**
- *
- * @author Mayo Clinic
- */
-public class RomanNumeralToken extends BaseTokenImpl {
-
- public RomanNumeralToken(int startOffset, int endOffset) {
- super(startOffset, endOffset);
- }
-
-}
+package edu.mayo.bmi.fsm.output;
+
+/**
+ *
+ * @author Mayo Clinic
+ */
+public class RomanNumeralToken extends BaseTokenImpl {
+
+ public RomanNumeralToken(int startOffset, int endOffset) {
+ super(startOffset, endOffset);
+ }
+
+}
Modified: incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/output/StatusIndicator.java
URL: http://svn.apache.org/viewvc/incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/output/StatusIndicator.java?rev=1403989&r1=1403988&r2=1403989&view=diff
==============================================================================
--- incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/output/StatusIndicator.java (original)
+++ incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/output/StatusIndicator.java Wed Oct 31 05:26:43 2012
@@ -1,18 +1,11 @@
/*
- * Copyright: (c) 2009 Mayo Foundation for Medical Education and
- * Research (MFMER). All rights reserved. MAYO, MAYO CLINIC, and the
- * triple-shield Mayo logo are trademarks and service marks of MFMER.
- *
- * Except as contained in the copyright notice above, or as used to identify
- * MFMER as the author of this software, the trade names, trademarks, service
- * marks, or product names of the copyright holder shall not be used in
- * advertising, promotion or otherwise in connection with this software without
- * prior written authorization of the copyright holder.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@@ -21,28 +14,28 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-/*
- * Created on Aug 23, 2005
- *
- */
-package edu.mayo.bmi.fsm.output;
-
-/**
- * @author Mayo Clinic
- *
- */
-public class StatusIndicator extends BaseTokenImpl {
- public static final int HISTORY_STATUS = 1;
- public static final int FAMILY_HISTORY_STATUS = 2;
- public static final int PROBABLE_STATUS = 3;
- private int iv_status;
-
- public StatusIndicator(int start, int end, int status) {
- super(start, end);
- iv_status = status;
- }
-
- public int getStatus() {
- return iv_status;
- }
-}
+/*
+ * Created on Aug 23, 2005
+ *
+ */
+package edu.mayo.bmi.fsm.output;
+
+/**
+ * @author Mayo Clinic
+ *
+ */
+public class StatusIndicator extends BaseTokenImpl {
+ public static final int HISTORY_STATUS = 1;
+ public static final int FAMILY_HISTORY_STATUS = 2;
+ public static final int PROBABLE_STATUS = 3;
+ private int iv_status;
+
+ public StatusIndicator(int start, int end, int status) {
+ super(start, end);
+ iv_status = status;
+ }
+
+ public int getStatus() {
+ return iv_status;
+ }
+}
Modified: incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/output/TimeToken.java
URL: http://svn.apache.org/viewvc/incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/output/TimeToken.java?rev=1403989&r1=1403988&r2=1403989&view=diff
==============================================================================
--- incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/output/TimeToken.java (original)
+++ incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/output/TimeToken.java Wed Oct 31 05:26:43 2012
@@ -1,18 +1,11 @@
/*
- * Copyright: (c) 2009 Mayo Foundation for Medical Education and
- * Research (MFMER). All rights reserved. MAYO, MAYO CLINIC, and the
- * triple-shield Mayo logo are trademarks and service marks of MFMER.
- *
- * Except as contained in the copyright notice above, or as used to identify
- * MFMER as the author of this software, the trade names, trademarks, service
- * marks, or product names of the copyright holder shall not be used in
- * advertising, promotion or otherwise in connection with this software without
- * prior written authorization of the copyright holder.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@@ -21,15 +14,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package edu.mayo.bmi.fsm.output;
-
-/**
- *
- * @author Mayo Clinic
- */
-public class TimeToken extends BaseTokenImpl {
- public TimeToken(int startOffset, int endOffset) {
- super(startOffset, endOffset);
- }
-
-}
+package edu.mayo.bmi.fsm.output;
+
+/**
+ *
+ * @author Mayo Clinic
+ */
+public class TimeToken extends BaseTokenImpl {
+ public TimeToken(int startOffset, int endOffset) {
+ super(startOffset, endOffset);
+ }
+
+}
Modified: incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/state/NamedState.java
URL: http://svn.apache.org/viewvc/incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/state/NamedState.java?rev=1403989&r1=1403988&r2=1403989&view=diff
==============================================================================
--- incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/state/NamedState.java (original)
+++ incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/state/NamedState.java Wed Oct 31 05:26:43 2012
@@ -1,18 +1,11 @@
/*
- * Copyright: (c) 2009 Mayo Foundation for Medical Education and
- * Research (MFMER). All rights reserved. MAYO, MAYO CLINIC, and the
- * triple-shield Mayo logo are trademarks and service marks of MFMER.
- *
- * Except as contained in the copyright notice above, or as used to identify
- * MFMER as the author of this software, the trade names, trademarks, service
- * marks, or product names of the copyright holder shall not be used in
- * advertising, promotion or otherwise in connection with this software without
- * prior written authorization of the copyright holder.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@@ -21,40 +14,40 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package edu.mayo.bmi.fsm.state;
-
-import net.openai.util.fsm.State;
-
-/**
- * Used mainly for aiding the debugging process.
- *
- * @author Mayo Clinic
- */
-@SuppressWarnings("serial")
-public class NamedState extends State {
-
- public NamedState(String name) {
- setName(name);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see net.openai.util.fsm.State#enter(java.lang.Object)
- */
- public void enter(Object arg0) {
- // TODO Auto-generated method stub
-
- }
-
- /*
- * (non-Javadoc)
- *
- * @see net.openai.util.fsm.State#exit()
- */
- public Object exit() {
- // TODO Auto-generated method stub
- return null;
- }
-
-}
+package edu.mayo.bmi.fsm.state;
+
+import net.openai.util.fsm.State;
+
+/**
+ * Used mainly for aiding the debugging process.
+ *
+ * @author Mayo Clinic
+ */
+@SuppressWarnings("serial")
+public class NamedState extends State {
+
+ public NamedState(String name) {
+ setName(name);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see net.openai.util.fsm.State#enter(java.lang.Object)
+ */
+ public void enter(Object arg0) {
+ // TODO Auto-generated method stub
+
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see net.openai.util.fsm.State#exit()
+ */
+ public Object exit() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+}
Modified: incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/state/NonTerminalEndState.java
URL: http://svn.apache.org/viewvc/incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/state/NonTerminalEndState.java?rev=1403989&r1=1403988&r2=1403989&view=diff
==============================================================================
--- incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/state/NonTerminalEndState.java (original)
+++ incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/state/NonTerminalEndState.java Wed Oct 31 05:26:43 2012
@@ -1,18 +1,11 @@
/*
- * Copyright: (c) 2009 Mayo Foundation for Medical Education and
- * Research (MFMER). All rights reserved. MAYO, MAYO CLINIC, and the
- * triple-shield Mayo logo are trademarks and service marks of MFMER.
- *
- * Except as contained in the copyright notice above, or as used to identify
- * MFMER as the author of this software, the trade names, trademarks, service
- * marks, or product names of the copyright holder shall not be used in
- * advertising, promotion or otherwise in connection with this software without
- * prior written authorization of the copyright holder.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@@ -21,36 +14,36 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package edu.mayo.bmi.fsm.state;
-
-/**
- *
- * @author Mayo Clinic
- */
-@SuppressWarnings("serial")
-public class NonTerminalEndState extends NamedState {
- public NonTerminalEndState(String name) {
- super(name);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see net.openai.util.fsm.State#enter(java.lang.Object)
- */
- public void enter(Object arg0) {
- // TODO Auto-generated method stub
-
- }
-
- /*
- * (non-Javadoc)
- *
- * @see net.openai.util.fsm.State#exit()
- */
- public Object exit() {
- // TODO Auto-generated method stub
- return null;
- }
-
-}
+package edu.mayo.bmi.fsm.state;
+
+/**
+ *
+ * @author Mayo Clinic
+ */
+@SuppressWarnings("serial")
+public class NonTerminalEndState extends NamedState {
+ public NonTerminalEndState(String name) {
+ super(name);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see net.openai.util.fsm.State#enter(java.lang.Object)
+ */
+ public void enter(Object arg0) {
+ // TODO Auto-generated method stub
+
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see net.openai.util.fsm.State#exit()
+ */
+ public Object exit() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+}
Modified: incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/token/BaseToken.java
URL: http://svn.apache.org/viewvc/incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/token/BaseToken.java?rev=1403989&r1=1403988&r2=1403989&view=diff
==============================================================================
--- incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/token/BaseToken.java (original)
+++ incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/token/BaseToken.java Wed Oct 31 05:26:43 2012
@@ -1,18 +1,11 @@
/*
- * Copyright: (c) 2009 Mayo Foundation for Medical Education and
- * Research (MFMER). All rights reserved. MAYO, MAYO CLINIC, and the
- * triple-shield Mayo logo are trademarks and service marks of MFMER.
- *
- * Except as contained in the copyright notice above, or as used to identify
- * MFMER as the author of this software, the trade names, trademarks, service
- * marks, or product names of the copyright holder shall not be used in
- * advertising, promotion or otherwise in connection with this software without
- * prior written authorization of the copyright holder.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@@ -21,10 +14,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package edu.mayo.bmi.fsm.token;
-
-public interface BaseToken {
- public int getStartOffset();
-
- public int getEndOffset();
-}
+package edu.mayo.bmi.fsm.token;
+
+public interface BaseToken {
+ public int getStartOffset();
+
+ public int getEndOffset();
+}
Modified: incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/token/CharacterToken.java
URL: http://svn.apache.org/viewvc/incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/token/CharacterToken.java?rev=1403989&r1=1403988&r2=1403989&view=diff
==============================================================================
--- incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/token/CharacterToken.java (original)
+++ incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/token/CharacterToken.java Wed Oct 31 05:26:43 2012
@@ -1,18 +1,11 @@
/*
- * Copyright: (c) 2009 Mayo Foundation for Medical Education and
- * Research (MFMER). All rights reserved. MAYO, MAYO CLINIC, and the
- * triple-shield Mayo logo are trademarks and service marks of MFMER.
- *
- * Except as contained in the copyright notice above, or as used to identify
- * MFMER as the author of this software, the trade names, trademarks, service
- * marks, or product names of the copyright holder shall not be used in
- * advertising, promotion or otherwise in connection with this software without
- * prior written authorization of the copyright holder.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@@ -21,8 +14,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package edu.mayo.bmi.fsm.token;
-
-public interface CharacterToken extends BaseToken {
- public char getChar();
-}
+package edu.mayo.bmi.fsm.token;
+
+public interface CharacterToken extends BaseToken {
+ public char getChar();
+}
Modified: incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/token/ContractionToken.java
URL: http://svn.apache.org/viewvc/incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/token/ContractionToken.java?rev=1403989&r1=1403988&r2=1403989&view=diff
==============================================================================
--- incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/token/ContractionToken.java (original)
+++ incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/token/ContractionToken.java Wed Oct 31 05:26:43 2012
@@ -1,18 +1,11 @@
/*
- * Copyright: (c) 2009 Mayo Foundation for Medical Education and
- * Research (MFMER). All rights reserved. MAYO, MAYO CLINIC, and the
- * triple-shield Mayo logo are trademarks and service marks of MFMER.
- *
- * Except as contained in the copyright notice above, or as used to identify
- * MFMER as the author of this software, the trade names, trademarks, service
- * marks, or product names of the copyright holder shall not be used in
- * advertising, promotion or otherwise in connection with this software without
- * prior written authorization of the copyright holder.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@@ -21,8 +14,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package edu.mayo.bmi.fsm.token;
-
-public interface ContractionToken extends BaseToken {
-
-}
+package edu.mayo.bmi.fsm.token;
+
+public interface ContractionToken extends BaseToken {
+
+}
Modified: incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/token/DecimalToken.java
URL: http://svn.apache.org/viewvc/incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/token/DecimalToken.java?rev=1403989&r1=1403988&r2=1403989&view=diff
==============================================================================
--- incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/token/DecimalToken.java (original)
+++ incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/token/DecimalToken.java Wed Oct 31 05:26:43 2012
@@ -1,18 +1,11 @@
/*
- * Copyright: (c) 2009 Mayo Foundation for Medical Education and
- * Research (MFMER). All rights reserved. MAYO, MAYO CLINIC, and the
- * triple-shield Mayo logo are trademarks and service marks of MFMER.
- *
- * Except as contained in the copyright notice above, or as used to identify
- * MFMER as the author of this software, the trade names, trademarks, service
- * marks, or product names of the copyright holder shall not be used in
- * advertising, promotion or otherwise in connection with this software without
- * prior written authorization of the copyright holder.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@@ -21,8 +14,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package edu.mayo.bmi.fsm.token;
-
-public interface DecimalToken extends NumberToken {
- public double getValue();
-}
+package edu.mayo.bmi.fsm.token;
+
+public interface DecimalToken extends NumberToken {
+ public double getValue();
+}
Modified: incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/token/EolToken.java
URL: http://svn.apache.org/viewvc/incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/token/EolToken.java?rev=1403989&r1=1403988&r2=1403989&view=diff
==============================================================================
--- incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/token/EolToken.java (original)
+++ incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/token/EolToken.java Wed Oct 31 05:26:43 2012
@@ -1,18 +1,11 @@
/*
- * Copyright: (c) 2009 Mayo Foundation for Medical Education and
- * Research (MFMER). All rights reserved. MAYO, MAYO CLINIC, and the
- * triple-shield Mayo logo are trademarks and service marks of MFMER.
- *
- * Except as contained in the copyright notice above, or as used to identify
- * MFMER as the author of this software, the trade names, trademarks, service
- * marks, or product names of the copyright holder shall not be used in
- * advertising, promotion or otherwise in connection with this software without
- * prior written authorization of the copyright holder.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@@ -21,8 +14,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package edu.mayo.bmi.fsm.token;
-
-public interface EolToken extends BaseToken {
-
-}
+package edu.mayo.bmi.fsm.token;
+
+public interface EolToken extends BaseToken {
+
+}
Modified: incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/token/IntegerToken.java
URL: http://svn.apache.org/viewvc/incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/token/IntegerToken.java?rev=1403989&r1=1403988&r2=1403989&view=diff
==============================================================================
--- incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/token/IntegerToken.java (original)
+++ incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/token/IntegerToken.java Wed Oct 31 05:26:43 2012
@@ -1,18 +1,11 @@
/*
- * Copyright: (c) 2009 Mayo Foundation for Medical Education and
- * Research (MFMER). All rights reserved. MAYO, MAYO CLINIC, and the
- * triple-shield Mayo logo are trademarks and service marks of MFMER.
- *
- * Except as contained in the copyright notice above, or as used to identify
- * MFMER as the author of this software, the trade names, trademarks, service
- * marks, or product names of the copyright holder shall not be used in
- * advertising, promotion or otherwise in connection with this software without
- * prior written authorization of the copyright holder.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@@ -21,8 +14,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package edu.mayo.bmi.fsm.token;
-
-public interface IntegerToken extends BaseToken {
- public long getValue();
-}
+package edu.mayo.bmi.fsm.token;
+
+public interface IntegerToken extends BaseToken {
+ public long getValue();
+}
Modified: incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/token/NumberToken.java
URL: http://svn.apache.org/viewvc/incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/token/NumberToken.java?rev=1403989&r1=1403988&r2=1403989&view=diff
==============================================================================
--- incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/token/NumberToken.java (original)
+++ incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/token/NumberToken.java Wed Oct 31 05:26:43 2012
@@ -1,18 +1,11 @@
/*
- * Copyright: (c) 2009 Mayo Foundation for Medical Education and
- * Research (MFMER). All rights reserved. MAYO, MAYO CLINIC, and the
- * triple-shield Mayo logo are trademarks and service marks of MFMER.
- *
- * Except as contained in the copyright notice above, or as used to identify
- * MFMER as the author of this software, the trade names, trademarks, service
- * marks, or product names of the copyright holder shall not be used in
- * advertising, promotion or otherwise in connection with this software without
- * prior written authorization of the copyright holder.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@@ -21,8 +14,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package edu.mayo.bmi.fsm.token;
-
-public interface NumberToken extends BaseToken {
- public boolean getPositive();
-}
+package edu.mayo.bmi.fsm.token;
+
+public interface NumberToken extends BaseToken {
+ public boolean getPositive();
+}
Modified: incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/token/PunctuationToken.java
URL: http://svn.apache.org/viewvc/incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/token/PunctuationToken.java?rev=1403989&r1=1403988&r2=1403989&view=diff
==============================================================================
--- incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/token/PunctuationToken.java (original)
+++ incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/token/PunctuationToken.java Wed Oct 31 05:26:43 2012
@@ -1,18 +1,11 @@
/*
- * Copyright: (c) 2009 Mayo Foundation for Medical Education and
- * Research (MFMER). All rights reserved. MAYO, MAYO CLINIC, and the
- * triple-shield Mayo logo are trademarks and service marks of MFMER.
- *
- * Except as contained in the copyright notice above, or as used to identify
- * MFMER as the author of this software, the trade names, trademarks, service
- * marks, or product names of the copyright holder shall not be used in
- * advertising, promotion or otherwise in connection with this software without
- * prior written authorization of the copyright holder.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@@ -21,8 +14,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package edu.mayo.bmi.fsm.token;
-
-public interface PunctuationToken extends CharacterToken {
-
-}
+package edu.mayo.bmi.fsm.token;
+
+public interface PunctuationToken extends CharacterToken {
+
+}
Modified: incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/token/SymbolToken.java
URL: http://svn.apache.org/viewvc/incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/token/SymbolToken.java?rev=1403989&r1=1403988&r2=1403989&view=diff
==============================================================================
--- incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/token/SymbolToken.java (original)
+++ incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/token/SymbolToken.java Wed Oct 31 05:26:43 2012
@@ -1,18 +1,11 @@
/*
- * Copyright: (c) 2009 Mayo Foundation for Medical Education and
- * Research (MFMER). All rights reserved. MAYO, MAYO CLINIC, and the
- * triple-shield Mayo logo are trademarks and service marks of MFMER.
- *
- * Except as contained in the copyright notice above, or as used to identify
- * MFMER as the author of this software, the trade names, trademarks, service
- * marks, or product names of the copyright holder shall not be used in
- * advertising, promotion or otherwise in connection with this software without
- * prior written authorization of the copyright holder.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@@ -21,8 +14,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package edu.mayo.bmi.fsm.token;
-
-public interface SymbolToken extends CharacterToken {
-
-}
+package edu.mayo.bmi.fsm.token;
+
+public interface SymbolToken extends CharacterToken {
+
+}
Modified: incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/token/TextToken.java
URL: http://svn.apache.org/viewvc/incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/token/TextToken.java?rev=1403989&r1=1403988&r2=1403989&view=diff
==============================================================================
--- incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/token/TextToken.java (original)
+++ incubator/ctakes/branches/SHARPn-cTAKES/core/src/edu/mayo/bmi/fsm/token/TextToken.java Wed Oct 31 05:26:43 2012
@@ -1,18 +1,11 @@
/*
- * Copyright: (c) 2009 Mayo Foundation for Medical Education and
- * Research (MFMER). All rights reserved. MAYO, MAYO CLINIC, and the
- * triple-shield Mayo logo are trademarks and service marks of MFMER.
- *
- * Except as contained in the copyright notice above, or as used to identify
- * MFMER as the author of this software, the trade names, trademarks, service
- * marks, or product names of the copyright holder shall not be used in
- * advertising, promotion or otherwise in connection with this software without
- * prior written authorization of the copyright holder.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@@ -21,12 +14,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package edu.mayo.bmi.fsm.token;
-
-/**
- *
- * @author Mayo Clinic
- */
-public interface TextToken extends BaseToken {
- public String getText();
-}
+package edu.mayo.bmi.fsm.token;
+
+/**
+ *
+ * @author Mayo Clinic
+ */
+public interface TextToken extends BaseToken {
+ public String getText();
+}