zotero/zotero — pull request #217 by aurimasv (2012-12-21 20:59:45+00:00)
Title: Tweak recognizePDF to avoid false positives

This was prompted by http://forums.zotero.org/discussion/26927/pdf-with-incorrect-metadata/ where 1) short queries of very short words were being used and 2) an review article had a quote of the document and was being picked up. The actual article is not on google scholar and should not be located.

Only count lines with more than 3 words (since we drop first and last later) as cleaned lines, increase number of pages read and number of lines away from median length as good lines (due to more stringent selection criteria), do not attempt to query google with a short query if we run out of lines, try to pick lines for a query that are not next to each other (to avoid finding articles that quote the article we're looking for)

Some of these magic values might need to be further adjusted for best performance