pls help me if any material is there so that i can directly connect my data to wikipedia search if any one wants... for examle if anyone typed the text like india or some other u and one wants to get the information about india so how should i connect the wikipedia page with my application.........? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Jul 9, 11:52 am, harsh <harsh_shrid...-/E1597aS9LQAvxtiuMwx3w@public.gmane.org> wrote:> pls help me if any material is there so that i can directly connect > my > data to wikipedia search if any one wants... > for examle if anyone typed the text like india or some other u and one > wants to get the information about india so how should i connect the > wikipedia page with my application.........?What have you tried so far? Jeff softiesonrails.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
harsh wrote:> pls help me if any material is there so that i can directly connect > my > data to wikipedia search if any one wants... > for examle if anyone typed the text like india or some other u and one > wants to get the information about india so how should i connect the > wikipedia page with my application.........?think you just need a view helper; require ''uri'' def wikipedia_link(text) search_param = URI.encode(text) url = "http://en.wikipedia.org/wiki/Search?fulltext=Search&search=#{search_param}" return link_to(text, url) end does that work? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Matthew Rudy Jacobs wrote:> harsh wrote: >> pls help me if any material is there so that i can directly connect >> my >> data to wikipedia search if any one wants... >> for examle if anyone typed the text like india or some other u and one >> wants to get the information about india so how should i connect the >> wikipedia page with my application.........? > > think you just need a view helper; > > require ''uri'' > def wikipedia_link(text) > search_param = URI.encode(text) > url = > "http://en.wikipedia.org/wiki/Search?fulltext=Search&search=#{search_param}" > return link_to(text, url) > end > > does that work?or maybe you wanted a controller action :wiki_search or something def wiki_search search_param = URI.encode(params[:query]) url = "http://en.wikipedia.org/wiki/Search?fulltext=Search&search=#{search_param}" redirect_to url end -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
As far as I know, wikipedia has no API that would allow to get information directly (like amazon has for example) So you can only use Matthews way to go with the URL. There is dbpedia, some approach to get wikipedia in a form for querying, but I don''t know if it''s any good. http://dbpedia.org/About --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 9 Jul 2008, at 20:54, Thorsten Müller wrote:> > As far as I know, wikipedia has no API that would allow > to get information directly (like amazon has for example) > So you can only use Matthews way to go with the URL. >Or download a whole dump of wikipedia :-) http://en.wikipedia.org/wiki/Wikipedia:Database_download#Where_do_I_get ... Fred> There is dbpedia, some approach to get wikipedia in a > form for querying, but I don''t know if it''s any good. > > http://dbpedia.org/About > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---