Revision: 15296
http://gate.svn.sourceforge.net/gate/?rev=15296&view=rev
Author: valyt
Date: 2012-02-01 15:39:09 +0000 (Wed, 01 Feb 2012)
Log Message:
-----------
Some text about JAPE Plus.
Modified Paths:
--------------
userguide/trunk/jape.tex
userguide/trunk/recent-changes.tex
Added Paths:
-----------
userguide/trunk/jape-v-japeplus-histogram.png
userguide/trunk/jape-v-japeplus.png
Added: userguide/trunk/jape-v-japeplus-histogram.png
===================================================================
(Binary files differ)
Property changes on: userguide/trunk/jape-v-japeplus-histogram.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: userguide/trunk/jape-v-japeplus.png
===================================================================
(Binary files differ)
Property changes on: userguide/trunk/jape-v-japeplus.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: userguide/trunk/jape.tex
===================================================================
--- userguide/trunk/jape.tex 2012-02-01 14:57:13 UTC (rev 15295)
+++ userguide/trunk/jape.tex 2012-02-01 15:39:09 UTC (rev 15296)
@@ -2001,3 +2001,73 @@
operator instead (see Section~\ref{sec:jape:operators:regex}).
\end{itemize}
+\sect[sec:jape:plus]{JAPE Plus}
+Version $7.0$ of GATE Developer/Embedded saw the introduction of the
+\texttt{JAPE\_Plus} plugin, which includes a new JAPE execution engine, in the
+form of the \texttt{JAPE-Plus Transducer}. The \texttt{JAPE-Plus Transducer}
+should be a drop-in replacement for the standard JAPE Transducer: it accepts
the
+same language (i.e. JAPE grammars) and it has a similar set of parameters. The
+\texttt{JAPE-Plus Transducer} includes a series of optimisations designed to
+speed-up the execution:
+\begin{description}
+ \item [FSM Minimisation] the finite state machine used internally to
represent
+ the JAPE grammars is minimised, reducing the number of tests that to be
+ performed at execution time.
+ \item [Annotation Graph Indexing] JAPE Plus uses a special data structure for
+ holding input annotations which is optimised for the types of tests performed
+ during the execution of JAPE grammars.
+ \item [Predicate Caching] JAPE pattern elements are converted into atomic
+ predicates, i.e. tests that cannot be further sub-divided (such as testing if
+ the value of a given annotation feature has a certain value). The truth value
+ for all predicates for each input annotation is cached once calculated, using
+ dynamic-programming techniques. This avoids the same test being evaluated
+ multiple times for the same annotation.
+ \item [Compilation of the State Machine] the finite state machine used during
+ matching is converted into Java code that is then compiled on the fly. This
+ allows the inlining of constants and the unwinding of execution loops.
+ Additionally, the Java JIT optimisations can also apply in this set-up.
+\end{description}
+
+One small difference between JAPE and JAPE Plus is that the latter behaves in a
+more deterministic fashion. There are cases where multiple paths inside the
+annotation graph can be matched with the same precedence, e.g. when the same
+JAPE rule matches different sets of annotations using different branches of a
+disjunction in the rule. In such situations, the standard JAPE engine will pick
+one of the possible paths at random and apply the rule using it. Separate
+executions of the same grammar over the same document can thus lead to
different
+results. By contrast, JAPE Plus will always choose the same matching set of
+annotations. It is however not possible to know a priori which one will be
+chosen, unless the rules are re-written to remove the ambiguity (solution which
+is also possible with the standard JAPE engine).
+
+\begin{figure}[htb]
+\begin{center}
+\includegraphics[scale=0.5]{jape-v-japeplus}
+\caption{JAPE and JAPE Plus execution speed for document length}
+\label{fig:jape:plus-speed}
+\end{center}
+\end{figure}
+
+It is not possible to accurately quantify the speed differential between JAPE
+and JAPE Plus in the general case, as that depends on the complexity of the
JAPE
+grammars used and of the input documents. To get one useful data point we
+performed an experiment where we processed just over 8,000 web pages from the
+BBC News web site, with the ANNIE NE grammars, using both JAPE and JAPE Plus.
On
+average the execution speed was 4 times faster when using JAPE Plus. The
+smallest speed differential was 1 (i.e. JAPE Plus was as fast as JAPE), the
+highest was 9 times faster. Figure~\ref{fig:jape:plus-speed} plots the
execution
+speed for both engines against document length. As can be seen, JAPE Plus is
+consistently faster on all document sizes.
+
+Figure~\ref{fig:jape:plus-histogram} includes a histogram showing the number of
+documents for each speed differential. For the vast majority of documents, JAPE
+Plus was 3 times or more faster than JAPE.
+
+\begin{figure}[htb]
+\begin{center}
+\includegraphics[scale=0.5]{jape-v-japeplus-histogram}
+\caption{JAPE Plus execution speed differential}
+\label{fig:jape:plus-histogram}
+\end{center}
+\end{figure}
+
Modified: userguide/trunk/recent-changes.tex
===================================================================
--- userguide/trunk/recent-changes.tex 2012-02-01 14:57:13 UTC (rev 15295)
+++ userguide/trunk/recent-changes.tex 2012-02-01 15:39:09 UTC (rev 15296)
@@ -23,10 +23,16 @@
\rcSubsect{January 2012}
+A new plugin named \texttt{JAPE\_Plus} has been added. It contains a new JAPE
+execution engine that includes various optimisations and should be
significantly
+faster than the standard engine. \texttt{JAPE\_Plus} has not yet been
+comprehensively tested, so it should be considered {\em beta} software, and
used
+with caution. See Section~\ref{sec:jape:plus} for more details.
+
The folder BengaliNE has been deleted from the resources folder inside the
ANNIE plugin.
The following plugins were made obsolete and were removed from the
distribution: GAZE (for
-all gazetters except the OntoGazetteer) Jape\_Compiler, Ontology\_OWLIM2,
Web\_Search\_Google
+all gazetteers except the OntoGazetteer) Jape\_Compiler, Ontology\_OWLIM2,
Web\_Search\_Google
Web\_Search\_Yahoo, and Web\_Translate\_Google. Documentation of obsolete
plugins can now be found in
Appendix~\ref{chap:obsolete-plugins}.
@@ -62,7 +68,7 @@
\texttt{segmentAnnotationFeatureName} and
\texttt{segmentAnnotationFeatureValue}.
These features allow users to specify a constraint on feature name and feature
value.
If user has provided values for these parameters, only the annotations with
the
-sepcified feature name and feature value are processed with the Segment
Processing
+specified feature name and feature value are processed with the Segment
Processing
PR. Also, the parameter \texttt{controller} has been renamed to
\texttt{analyser}
which means the Segment Processing PR can now also run an individual PR on the
specified segments. See \ref{sec:alignment:segment-processing} for more
@@ -90,7 +96,7 @@
\rcSubsect{June 2011}
-Added suport for the GENIA sentence splitter allowing for a full GENIA
application. See
+Added support for the GENIA sentence splitter allowing for a full GENIA
application. See
Section~\ref{sec:domain-creole:biomed:genia} for details.
The rule and phase names are now accessible in a JAPE Java RHS by the
@@ -119,7 +125,7 @@
(assuming you put the gold standard annotations in a set called Key).
The script behind an instance of the Groovy Scripting PR
(Section~\ref{sec:api:groovy:pr})
-can now be edited from within GATE Developer through a new visual resource
which supoorts syntax highlighting.
+can now be edited from within GATE Developer through a new visual resource
which supports syntax highlighting.
The TextCat based Language Identification PR now supports generating new
language fingerprints.
See Section~\ref{sec:misc-creole:language-identification} for full details.
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs