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.
Monday, January 09, 2006
Subscribe to:
Post Comments (Atom)
33 comments:
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.
Thanks for sharing the information with us...
data science training institutes in bangalore
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
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
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
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
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
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
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
Thanks for such a great post and the review, I am totally impressed! Keep stuff like this coming.
business analytics course
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
Great blog post,
Digital Marketing Training in KPHB with 100% Internships & Job Assistance.
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
Thank you so much for doing the impressive job here, everyone will surely like your post.
data science course
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
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
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
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
Thanks for the informative and helpful post, obviously in your blog everything is good..
data scientist course
Very awesome!!! When I seek for this I found this website at the top of all blogs in search engine.
full stack development course
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
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!
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.
Thanks for such a great post and the review, I am totally impressed! Keep stuff like this coming.
cyber security course
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.
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
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 |
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
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
thank you for taking the duration to proclamation this find the maintain for an opinion totally beneficial!.... https://wishesquotz.com/sunday-morning-quotes/
Thanks for sharing this superb site work its too good.
IDM Crack
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/
Post a Comment