1. NodeBox 1
    1. Homepage
    2. NodeBox 3Node-based app for generative design and data visualization
    3. NodeBox OpenGLHardware-accelerated cross-platform graphics library
    4. NodeBox 1Generate 2D visuals using Python code (Mac OS X only)
  2. Gallery
  3. Documentation
  4. Forum
  5. Blog

Icelandic wikipedia search does not work for querys with spaces.

Posted by Ingvi on Mar 09, 2011

web.wikipedia.search fails to return anything for search strings that contain a whitespace if the language is set to 'is'.

Example - This does not find anything, but the article does exist:

web.wikipedia.search("Haraldur Hamar Thorsteinsson", language='is')
No problems with single word queries or when using language='en'.


 
Posted by Ingvi on Mar 09, 2011

Forgot to mention, I'm using version 1.9.4.3-1 from the python-nodebox-web package on Ubuntu Karmic, running Python 2.6.4.



Posted by Josh Caswell on Mar 09, 2011

It seems that even though the web library documentation says case-insensitive search is better, Wikipedia prefers case-sensitive. (This is also true for the English searches I just tried.) Wikipedia may have changed their search routine since the NB web library was written. Try your searches with the extra argument:

web.wikipedia.search("Haraldur Hamar Thorsteinsson", language='is', 
case_sensitive=True)



Posted by Ingvi on Mar 10, 2011

Yes, this it works with case_sensitive=True. Thank you.

And interestingly even with case_sensitive turned on it still finds matches for querys where the case does not match, but i'm not complaining.