Monday, January 09, 2006

CAS
The interfaces in UIMA have seemed rather obtuse recently.

To process a document, an analysis module is given a CAS (Common Analysis System), and returns a CAS. The CAS contains a reference to the original document, and any annotations that have been made so far. A module can ask the CAS for the original document, perform its analysis, and add any annotations back into the CAS. At the end of the process, the UIMA framework returns a CAS object which can be checked for annotation properties.

Adding annotations to a CAS is an easy process for a module. An appropriate Annotation derivative is created for the current CAS (the CAS object is passed as a parameter to the Annotation's constructor). It is also easy to read these annotations after UIMA has finished. However, the CAS objects in each case are accessed through different classes, with different features. In an analysis module I have a JCas object, but the results of the UIMA run are returning a TCAS object instead. TCAS is actually just a specialization for handling text of a standard CAS object, but I didn't see that immediately (I should have paid closer attention).

Fortunately, a JCas object has a method called getCAS(), and a CAS has a getJCas() method, as these objects have a 1:1 correspondence. Why have two objects? I think it's to separate out the CAS concepts from the Java specific information needed to manipulate a CAS. But don't quote me.

Separating these two classes, and providing different types in different circumstances has tripped me up a bit. Maybe someone can explain the reasoning, but I've just found it annoying.

33 comments:

Anonymous said...

Hi. I am an IBM internal user of UIMA but not an SDK developer or official spokesperson or anything. I just ran across this entry in a web search, and here are my 2 cents on this subject:

CAS and TCAS are the original interfaces for interacting with UIMA data. If I wanted to create a feature structure of type org.example.Smurf and set a feature named "color" to "blue" using the CAS interface, I would do something like the following, if I recall correctly:

Type smurfType = myCas.getTypeSystem().getType("org.example.Smurf")
FeatureStructure mySmurf = myCas.createFS(smurfType)
;
Feature color = smurfType.getFeatureByBaseName("color");
mySmurf.setFeatureValue(color, "blue");
myCas.getIndexRepository().addFS(mySmurf);

This mechanism works, but it is kind of clumsy for routine use and doesn't really make full use of the object-oriented paradigm. Thus the JCas was added to provide a different way to interact with CAS information. Systems that use JCas require that the JCasGen program be used to create distinct Java classes for each seperate type in the type system. These systems then interact directly with those types, e.g.:

Smurf smurf = new Smurf(myJCas);
smurf.setColor("blue");
smurf.addToIndexes();

This is very convenient for typical cases like the ones above. However, it is fairly inconvenient if you want to write a more generic CAS processor that doesn't have a predefined set of types and features it manipulates, e.g., one that accesses an external database to give it names of types and features. In the CAS interaction above, you could just replace the literal strings with string variables that were populated from a database. To accomplish the same thing with JCas would require some fairly complicated Java reflection code (especially to do the "setColor"). Thus JCas exists as a friendly interface for typical use and the original CAS interface is still available for more complex/abstract interactions.

Ismail said...

Thanks for sharing the information with us...
data science training institutes in bangalore

bavisthra said...

Study ExcelR PMP Certification where you get a great experience and better knowledge.

PMP Certification


Location 1:

ExcelR - Data Science, Data Analytics Course Training in Bangalore 49, 1st Cross, 27th Main BTM Layout stage 1 Behind Tata Motors Bengaluru, Karnataka 560068 Phone: 096321 56744 Hours: Sunday - Saturday 7AM - 11PM.

Comments

nisha said...

The Blog is Really very Impressive. the blog is clarifying thr queries easily.

Data Science Training Course In Chennai | Data Science Training Course In Anna Nagar | Data Science Training Course In OMR | Data Science Training Course In Porur | Data Science Training Course In Tambaram | Data Science Training Course In Velachery


Avijit said...

I for one think your article is intriguing, fascinating, and astonishing. I share a portion of your equivalent convictions on this subject. I like your composing style and will return to your site.


SEO services in kolkata
Best SEO services in kolkata
SEO company in kolkata
Best SEO company in kolkata
Top SEO company in kolkata
Top SEO services in kolkata
SEO services in India
SEO copmany in India

eazyclasses said...

I like your article Your interpretation of this point is elegantly composed and unique. I could never have thought of this.


Online Teaching Platforms
Online Live Class Platform
Online Classroom Platforms
Online Training Platforms
Online Class Software
Virtual Classroom Software
Online Classroom Software
Learning Management System
Learning Management System for Schools
Learning Management System for Colleges
Learning Management System for Universities

Avijit said...

I had to read this three times because I wanted to be sure on some of your points. I agree on almost everything here, and I am impressed with how well you wrote this article.


Denial management software
Denials management software
Hospital denial management software
Self Pay Medicaid Insurance Discovery
Uninsured Medicaid Insurance Discovery
Medical billing Denial Management Software
Self Pay to Medicaid
Charity Care Software
Patient Payment Estimator
Underpayment Analyzer
Claim Status

rocky said...

I read your article is very nice content. Thanks
Python Training in Chennai

Python Training in Bangalore

Python Training in Hyderabad

Python Training in Coimbatore

Python Training

python online training

python flask training

python flask online training


Anirban Ghosh said...

I am highly overwhelmed to read this perfect piece of writing. It has really enthused me to read more on this topic.

SAP training in Kolkata
SAP training Kolkata
Best SAP training in Kolkata
SAP course in Kolkata

360digiTMG Training said...

Thanks for such a great post and the review, I am totally impressed! Keep stuff like this coming.
business analytics course


Gopinath N said...
This comment has been removed by the author.
traininginstitute said...

First You got a great blog .I will be interested in more similar topics. I see you have really very useful topics, I will be always checking your blog thanks.
business analytics course

Anonymous said...

Great blog post,
Digital Marketing Training in KPHB with 100% Internships & Job Assistance.

Priya Rathod said...

HI, Such a nice blog and i appreciate your all efforts about your thoughts. it's really good work. well done.
AWS Training in Hyderabad
AWS Course in Hyderabad

traininginstitute said...

Thank you so much for doing the impressive job here, everyone will surely like your post.
data science course

Lokeswari said...

I think this is one of the best blog for me because this is really helpful for me. Thanks for sharing this valuable information

internship meaning | internship meaning in tamil | internship work from home | internship certificate format | internship for students | internship letter | Internship completion certificate | internship program | internship certificate online | internship graphic design

traininginstitute said...

This is an excellent post I seen thanks to share it. It is really what I wanted to see hope in future you will continue for sharing such a excellent post.
data science course

Pallavireddy said...

i am glad to discover this page : i have to thank you for the time i spent on this especially great reading !! i really liked each part and also bookmarked you for new information on your site.
machine learning course in noida

traininginstitute said...

Glad to chat your blog, I seem to be forward to more reliable articles and I think we all wish to thank so many good articles, blog to share with us.
data science course

traininginstitute said...

Thanks for the informative and helpful post, obviously in your blog everything is good..
data scientist course

traininginstitute said...

Very awesome!!! When I seek for this I found this website at the top of all blogs in search engine.
full stack development course

Ramesh Sampangi said...

Really awesome blog, informative blog, and knowledgeable content. Thanks for sharing with us. If you want to become a data science expert, then check out the following link.
Best Data Science Course in Hyderabad

Project Management Course said...

It is perfect chance to make a couple of game plans for the future and the opportunity has arrived to be sprightly. I've scrutinized this post and if I may I have the option to need to suggest you some interesting things or recommendations. Perhaps you could create next articles insinuating this article. I have to examine more things about it!

PMP Training in Malaysia said...

Pleasant data, important and incredible structure, as offer great stuff with smart thoughts and ideas, loads of extraordinary data and motivation, the two of which I need, because of offer such an accommodating data here.

traininginstitute said...

Thanks for such a great post and the review, I am totally impressed! Keep stuff like this coming.
cyber security course

PMP Training in Malaysia said...

360DigiTMG, the top-rated organisation among the most prestigious industries around the world, is an educational destination for those looking to pursue their dreams around the globe. The company is changing careers of many people through constant improvement, 360DigiTMG provides an outstanding learning experience and distinguishes itself from the pack. 360DigiTMG is a prominent global presence by offering world-class training. Its main office is in India and subsidiaries across Malaysia, USA, East Asia, Australia, Uk, Netherlands, and the Middle East.

360DigiTMG said...

I wanted to leave a little comment to support you and wish you a good continuation. Wishing you the best of luck for all your blogging efforts.
data analytics courses in hyderabad with placements

periyannan said...


Your info is really amazing with impressive content..Excellent blog with informative concept. Really I feel happy to see this useful blog, Thanks for sharing such a nice blog..

python internship | web development internship |internship for mechanical engineering students |mechanical engineering internships |java training in chennai |internship for 1st year engineering students |online internships for cse students |online internship for engineering students |internship for ece students|data science internships |

Let2know said...

I later this message,and that i wager that they having a laugh to log on this say,they shall proclamation you'll a satisfying web site to make a advocate,thank you for sharing it to me... Avast VPN Key Generator

trublogger said...

this is such a nice useful resource that you are supplying and also you meet the price of it away for forgive. I hero reward seeing Websites that take at the value of supplying a setting useful resource for set wandering. it's far the primeval what goes on the order of comes almost about recurring..... Grammarly Crack

Cyberz Pc said...

thank you for taking the duration to proclamation this find the maintain for an opinion totally beneficial!.... https://wishesquotz.com/sunday-morning-quotes/

zscracked said...

Thanks for sharing this superb site work its too good.
IDM Crack

Maya said...



Very interesting and well-written post. I was looking for this info, and it was fun to read.
https://crackbye.com/windscribe-vpn-premium-crack/