Re: Elegant tools deserve elegant solutions. -- L. E. Gant

2011-08-11 Thread Tuba Lambanog
Hi, Petr, Thank you for the pointer to the site. Indeed a treasure trove of ideas on stemmer algorithms. Tuba On Thu, Aug 11, 2011 at 8:45 AM, Petr Gladkikh petrg...@gmail.com wrote: On Mon, Aug 8, 2011 at 1:46 PM, Tuba Lambanog tuba.lamba...@gmail.com wrote: Hello, I’m doing a word

Elegant tools deserve elegant solutions. -- L. E. Gant

2011-08-08 Thread Tuba Lambanog
Hello, I’m doing a word stemmer for a non-English language. A stemmer parses a word into its word parts: prefixes, roots, suffixes. The input word is at least a root word (English example would be ‘cloud’), but can be any combination of prefix(es) and a root (e.g., 'pre-nuptial'), or a root and

Re: Elegant tools deserve elegant solutions. -- L. E. Gant

2011-08-08 Thread Tuba Lambanog
: On Mon, Aug 8, 2011 at 2:46 AM, Tuba Lambanog tuba.lamba...@gmail.com wrote: I’m having a hard time thinking through the process of generating the candidate suffix set using set forms, and I’m beginning to think I have selected an arduous path (for me). Thoughts? Store the prefixes

Re: passing value to functions

2011-07-29 Thread Tuba Lambanog
Alan, The macro is great (output could use a bit of formatting for readability, but, hey, I'm not complaining). Thank you very much. Tuba On Thu, Jul 28, 2011 at 10:34 PM, Alan Malloy a...@malloys.org wrote: On Jul 28, 8:11 pm, Resty Cena restyc...@gmail.com wrote: Hi, Masanori, Yes, I

passing value to functions

2011-07-28 Thread Tuba Lambanog
Hello, I'm trying to pass a variable through a series of functions, which may change the value of the variable. However, the next function in line uses the original value, rather than the changed value. Here's a pseudo-code of what I'm doing. (defn process-1 [s] ; change value of s then return

Re: passing value to functions

2011-07-28 Thread Tuba Lambanog
from the Clojure way, since the value sent back is the state of the identify x at that point in time. I will try Laurent's suggestion. Thanks for the enlightenment! tuba On Jul 28, 5:03 am, Thorsten Wilms t...@freenet.de wrote: On 07/28/2011 11:29 AM, Tuba Lambanog wrote: I'm trying to pass

Re: passing value to functions

2011-07-28 Thread Tuba Lambanog
is that a function may be called from a number of places. Perhaps there's a better way? Thanks for the encouragement to ask questions here. tuba On Jul 28, 5:03 am, Thorsten Wilms t...@freenet.de wrote: On 07/28/2011 11:29 AM, Tuba Lambanog wrote: I'm trying to pass a variable through a series

Re: passing value to functions

2011-07-28 Thread Tuba Lambanog
Hi, Laurent, Your suggestion of manually piping intermediate results works. Thank you very much! Tuba On Thu, Jul 28, 2011 at 3:44 AM, Laurent PETIT laurent.pe...@gmail.comwrote: Hi, 2011/7/28 Tuba Lambanog tuba.lamba...@gmail.com Hello, I'm trying to pass a variable through a series

Need help on Replace

2011-07-21 Thread Tuba Lambanog
Hello, Alas, spent hours on this but can't get it to work. It's looking for a pattern: r between any vowels, then replace r with l. (clojure.string/replace-first The coror is red. #([aeiou])(?:r) ([aeiou]) #(str %1 l %2)) #CompilerException java.lang.IllegalArgumentException: Wrong number of

Re: Need help on Replace

2011-07-21 Thread Tuba Lambanog
This works! I really appreciate your help. Thank you very much. On Jul 21, 2:33 am, Meikel Brandmeyer m...@kotka.de wrote: Hi, the anonymous function takes only one argument which contains the matches. You have to extract the data from there. user= (clojure.string/replace The coror is red.

(count-all str1 str2)

2011-07-19 Thread Tuba Lambanog
Thinking of operations on collections to replace iteration is productive, but alas, I'm new to it. I'm looking for a way to count the number of occurrences of each and every character in str1 that occurs in str2, so that (count-all abc abracadabra) will give 8 which is the count of characters

Re: (count-all str1 str2)

2011-07-19 Thread Tuba Lambanog
That works well. Thank you very much! Tuba On Jul 19, 1:47 am, Meikel Brandmeyer m...@kotka.de wrote: Hi, how about this: (count (filter (set abc) abracadabra))? Sincerely Meikel -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this

converting a string into a set

2011-07-18 Thread Tuba Lambanog
Hello, My apologies for this newbie question. I couldn't find a way to convert a string to a set, thus: abc = #{a b c} Thanks. tuba -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note

Re: converting a string into a set

2011-07-18 Thread Tuba Lambanog
Hi, (set abc) gives me #{\a \b \c}. I'm expecting instead: #{a b c} But thanks, Tuba On Mon, Jul 18, 2011 at 9:50 PM, Tuba Lambanog tuba.lamba...@gmail.comwrote: Hello, My apologies for this newbie question. I couldn't find a way to convert a string to a set, thus: abc = #{a b c} Thanks

Re: converting a string into a set

2011-07-18 Thread Tuba Lambanog
(thank-you Sean A Corfield) On Mon, Jul 18, 2011 at 10:29 PM, Sean Corfield seancorfi...@gmail.comwrote: On Mon, Jul 18, 2011 at 9:17 PM, Tuba Lambanog tuba.lamba...@gmail.com wrote: (set abc) gives me #{\a \b \c}. I'm expecting instead: #{a b c} (set (map abc)) (set (map str Tuba

Re: converting a string into a set

2011-07-18 Thread Tuba Lambanog
doesn't matter here if the sets contain characters or symbols? Tuba On Mon, Jul 18, 2011 at 10:31 PM, Benjamin Esham bdes...@gmail.com wrote: Tuba Lambanog wrote: Tuba Lambanog wrote: Hello, My apologies for this newbie question. I couldn't find a way to convert a string to a set, thus

Re: Clojure Books

2011-07-18 Thread Tuba Lambanog
Hi, I find that the 'best' instruction book is the one that most closely meets the learner's current mind-set, preparedness (do you find the author making assumptions you know nothing about?), match between the practice problems you'd like to do and what the book provides, etc. Right now I'm

Re: converting a string into a set

2011-07-18 Thread Tuba Lambanog
Wow, that some function is just what I'd expect from Clojure, simple, straightforward, elegant. How did I miss it? Thanks all. Tuba On Jul 18, 11:00 pm, David Nolen dnolen.li...@gmail.com wrote: On Tue, Jul 19, 2011 at 12:48 AM, Tuba Lambanog tuba.lamba...@gmail.comwrote: Hi, I'm clear

(doc more-examples)

2011-07-16 Thread Tuba Lambanog
Hello, More examples in how to use a form in the (doc ...) facility within REPL would be very useful to newbies. Thanks. tuba -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts

Noobie needs help

2011-07-14 Thread Tuba Lambanog
Hello, Total noobie here. I'm trying to create a sort of a string maker function. Something like: (defn string-maker [string-name the-string] (def string-name (str the-string))) so that I can call the function like so: (string-maker friend Peter) which I expect to give me the variable:

Re: Anyone on Google+ yet?

2011-07-14 Thread Tuba Lambanog
http://profiles.google.com/tuba.lambanog On Thu, Jul 14, 2011 at 11:12 AM, Claudia Doppioslash claudia.doppiosl...@gmail.com wrote: My Clojure circle is all set up but empty. My g+ is: http://gplus.to/gattoclaudia Please add link to your profile below. -- You received this message

Unable to resolve var: subset? in this context (NO_SOURCE_FILE:1)

2011-07-14 Thread Tuba Lambanog
Hello, I'm getting an unresolved var error when I do (doc subset?), thus: Interactive Clojure console. Starting... Clojure 1.2.0 user= (doc subset?) java.lang.Exception: Unable to resolve var: subset? in this context (NO_SOURCE_FILE:1) I'm able to do doc on other forms. My clojure and

Re: Unable to resolve var: subset? in this context (NO_SOURCE_FILE:1)

2011-07-14 Thread Tuba Lambanog
Thank you! Tuba On Thu, Jul 14, 2011 at 2:24 PM, Daniel Janus nath...@gmail.com wrote: subset? is in the clojure.set namespace, so you must (use 'clojure.set) before you can use subset? unqualified. -- You received this message because you are subscribed to the Google Groups Clojure