uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kameron Cole" <kameronc...@us.ibm.com>
Subject uniqueID() function
Date Wed, 01 Nov 2017 17:55:12 GMT

Hello

I am trying to use the uniqueId() function, and find some examples.
Basically I want to use the CAS unique ID as the unique id Feature for an
annotation. Fro example, a police report Annotation would have a Feature
reportid, which would leverage the uniqueId() .  The ultimate purpose is to
send the CAS to a database table, and use the reportid as the row's unique
ID.

I can't find any information on it, except here:

http://uima.apache.org/d/uimaj-2.4.2/apidocs/org/apache/uima/cas/FeatureValuePath.html

Contains CAS Type and Feature objects to represent a feature path of the
form feature1/.../featureN. Each part that is enclosed within / is referred
to as "path snippet" below. Also contains the necessary evaluation logic to
yield the value of the feature path. For leaf snippets, the following
"special features" are defined:
      coveredText() can be accessed using evaluateAsString
      typeName() can be accessed using evaluateAsString
      fsId() can be accessed using evaluateAsInt. Its result can be used to
      retrieve an FS from the current LowLevel-CAS.
      uniqueId() can be accessed using evaluateAsInt. Its result can be
      used to uniquely identify an FS for a document (even if the document
      is split over several CAS chunks)

This is deprecated, and replaced with

http://uima.apache.org/d/uimaj-2.4.2/apidocs/org/apache/uima/cas/FeaturePath.html

However, FeaturePath does not have the uniqueID() method

The feature path syntax also allows some built-in functions on the last
feature path element. Built-in functions are added with a ":" followed by
the function name. E.g. "/my/path:fsId()". The allowed built-in functions
are:
      coveredText()
      fsId()
      typeName()
Built-in functions are only evaluated if getValueAsString() is called.

At least, I don't get it. Can I get an example?  Thanks




Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message