Revision: 19435
http://sourceforge.net/p/gate/code/19435
Author: ian_roberts
Date: 2016-06-22 13:11:11 +0000 (Wed, 22 Jun 2016)
Log Message:
-----------
Examples of quoting annotation types and features that contain characters other
than letters or digits
Modified Paths:
--------------
userguide/trunk/jape.tex
Modified: userguide/trunk/jape.tex
===================================================================
--- userguide/trunk/jape.tex 2016-06-22 11:56:23 UTC (rev 19434)
+++ userguide/trunk/jape.tex 2016-06-22 13:11:11 UTC (rev 19435)
@@ -169,6 +169,16 @@
\end{verbatim}
\end{small}
+If the annotation type contains anything other than ASCII letters and digits,
+you need to quote it:
+
+\begin{small}
+\begin{verbatim}
+{"html:table"}
+\end{verbatim}
+\end{small}
+
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsect{Using Features and Values}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -205,6 +215,15 @@
\end{verbatim}
\end{small}
+As with the annotation type, if you want to match a feature name that contains
+anything other than letters or digits, it must be quoted
+
+\begin{small}
+\begin{verbatim}
+ {element."xsi:type" == "xs:string"}
+\end{verbatim}
+\end{small}
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsect[sec:jape:metaproperties]{Using Meta-Properties}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -1055,6 +1074,16 @@
\end{verbatim}
\end{small}
+To create annotations whose type or features contain characters other
+than ASCII letters and digits, quote them appropriately:
+
+\begin{small}
+\begin{verbatim}
+ :example."New annotation" = {"entity type"="location"}
+\end{verbatim}
+\end{small}
+
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsect{Copying Feature Values from the LHS to the RHS}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -1094,6 +1123,9 @@
annotation, you should consider using Java code on the right hand side of your
rule (see Section \ref{sec:jape:javarhs}).
+As usual, if the annotation type or feature contains any unusual characters
+then they can be quoted (\verb!type = :loc."Some annotation"."feature 2"!)
+
In addition to copying feature values you can also copy meta-properties (see
section~\ref{sec:jape:metaproperties}):
%
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs