Unfortunately, the code is owned by my company and I am not authorized to release it. The methods are all fairly short and easy to write once you realize FSList is essentially the classic linked list we all learned in school but never implement anymore. I agree there should be some utility class in the framework. Ideally, the utility class would wrap FSList and the other various list classes in a Java Collection or List interface. Joon Chuah Engineer 21st Century Technologies, Inc 4515 Seton Center Parkway Suite 320 Austin, TX 78759
Phone: 512 342 0010 x 307 Email: [EMAIL PROTECTED] URL: http://www.21technologies.com <http://www.21technologies.com/> The information in this email and in any attachments is confidential and may be privleged. If you are not the intended recipient, please destroy this message, delete any copies held on y our systems and notify the sender immediately. You should not retain, copy or use this email for any purpose, nor disclose all or any part of its content to any other person. ________________________________ From: Thomas Francart [mailto:[EMAIL PROTECTED] Sent: Monday, September 24, 2007 6:56 AM To: [email protected] Subject: RE: Using and iterating with FSList FSArray Hi Thanks for your different answers. As a Java programmer, I was not familiar with the Lisp concepts, and I am used to work with the collection framework provided by the JDK. This is why the FSList implementation looked so strange to me. Your explanations make sense, but however, for an easier and a greater acceptance of UIMA, I think including some utility class in the framework like the one Joon described below would be more than useful (take this as a feedback from a UIMA beginner : I was able to understand the big picture, and make everything run easily thanks to the documentation (including some advanced features), but working with FSList/FSArray was really the only point I couldn't understand alone). Joon, is your set of helper methods something you can share ? Best, Thomas -- Thomas Francart Mondeca 3, cité Nollez 75018 Paris France Tel: +33 (0)1 44 92 35 04 - Fax: +33 (0)1 44 92 02 59 Blog: mondeca.wordpress.com Web: www.mondeca.com Mail: [EMAIL PROTECTED] I ended up writing a set of helper methods for doing commonly used operations like returning a Java Iterator over a FSList, appending an item, finding the length, and converting a Collection to an FSList. Since there is no common supertype for FSList, StringList, and the other list types I ended up having to duplicate the helper methods. One thing I tried to do as much as possible in my helper methods was preserve or reuse EmptyFSList instances so the CAS wouldn't get cluttered with them. Joon Chuah Engineer 21st Century Technologies, Inc 4515 Seton Center Parkway Suite 320 Austin, TX 78759 Phone: 512 342 0010 x 307 Email: [EMAIL PROTECTED] URL: http://www.21technologies.com <http://www.21technologies.com/> <http://www.21technologies.com/> The information in this email and in any attachments is confidential and may be privleged. If you are not the intended recipient, please destroy this message, delete any copies held on y our systems and notify the sender immediately. You should not retain, copy or use this email for any purpose, nor disclose all or any part of its content to any other person. ________________________________ From: Thomas Francart [mailto:[EMAIL PROTECTED] Sent: Friday, September 21, 2007 11:01 AM To: [EMAIL PROTECTED] Subject: Using and iterating with FSList FSArray Hi again UIMA gurus Working with FSList and FSArray in UIMA type systems looks like a lot of fun... : 1. I just can't figure out a way to iterate over a FSList, or NonEmptyFSList... how can I iterate over a feature that is defined as an FSList ? I can't find anything describing this in the documentation anywhere. 2. Similarly, I can iterate over a FSArray, but it looks tedious to add elements into it (what should I do when the array exceeds it size ?) any example of how to do that ? 3. Can anyone provide any quick explanation about the objectives behind the design of the FSList class ? (at least, knowing WHY it is like that would help me to live with it...) Btw, I have added the "improvement of FSArray and FSList" as a suggestion in the UIMA requirements/suggestions wiki. Best Thomas --
