API can not find an Wikipedia term &quo...

Help
2013-02-04
2013-12-18
  • Nikola Milikic
    Nikola Milikic
    2013-02-04

    Hi all,

    I am using the API and for the obvious Wikipedia term 'Learning', the API is returning that that term doesn't exist. For the following API call:

    http://wikipedia-miner.cms.waikato.ac.nz/services/compare?term1=Learning&term2=Peer%20production

    I am getting this message:

    <unknownTermMessage service="/services/compare" error="'Learning' is not a known term" unknownTerm="Learning">
        <request>
            <param name="term1">Learning</param>
            <param name="term2">Peer production</param>
        </request>
    </unknownTermMessage>
    

    Is this a bug or I am doing something wrong?

    Thanks a lot for the answer!

     
  • Nikola Milikic
    Nikola Milikic
    2013-02-12

    Does anyone please have any idea what can be the problem here?

    If I use 'exploreArticle' service for the same term 'Learning' (link), the term is recognized. So it is not the problem that the term does not exist, but 'compare' service, for some reason, does not recognize it.

    I appreciate any comment!

    Thanks,
    Nikola

     
    • Ondrej Zamazal
      Ondrej Zamazal
      2013-12-17

      Hi,
      I just encountered on the same problem. Is there any solution for this "unknown term for compare service"?

      Thanks
      Regards,
      Ondrej

       
  • David Milne
    David Milne
    2013-12-18

    Hi Guys,

    This is due to label caching. In the web services we don't use the database directly. instead we cache the vocabulary of labels to memory (if we didn't, the annotate service would be painfully slow).

    We don't cache all labels, but only those that have a reasonable probability of being a link. Unfortunately 'Learning' is found in many, many sentences where it is not used as a link, so it has a very small link probability and doesn't get cached.

    I have an idea for how to fix this and have logged an issue. You can keep tabs on it here: https://github.com/dnmilne/wikipediaminer/issues/13