We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi, I'm just trying to do a standard concept query and I'm getting 0 results. What am I doing wrong?
` TRAINING_STARTDATE = date(year = 2014, month = 1, day = 1) TRAINING_ENDDATE = date(year = 2019, month = 3, day = 13)
def query(outfile, params): q = QueryArticles( keywords = params["keywords"], conceptUri = "https://en.wikipedia.org/wiki/Apple_Inc.", categoryUri = params["categories"], sourceUri = params["sources"], sourceLocationUri = None, sourceGroupUri = None, authorUri = None, locationUri = None, lang = "eng", dateStart = TRAINING_ENDDATE - datetime.timedelta(days=7), dateEnd = TRAINING_ENDDATE, dateMentionStart = None, dateMentionEnd = None, keywordsLoc = "title", ignoreKeywords = None, ignoreConceptUri = None, ignoreCategoryUri = None, ignoreSourceUri = None, ignoreSourceLocationUri = None, ignoreSourceGroupUri = None, ignoreAuthorUri = None, ignoreLocationUri = None, ignoreLang = None, ignoreKeywordsLoc = "body", isDuplicateFilter = "keepAll", hasDuplicateFilter = "keepAll", eventFilter = "keepAll", startSourceRankPercentile = params["rankStart"], #experiment with this endSourceRankPercentile = params["rankEnd"], dataType = ["news", "pr", "blogs"])
r = ReturnInfo(articleInfo = ArticleInfoFlags( bodyLen = -1, title = True, basicInfo = True, body = True, url = True, eventUri = True, authors = True, concepts = True, categories = True, links = False, videos = False, image = False, socialScore = True, sentiment = True, location = False, dates = False, extractedDates = False, duplicateList = False, originalArticle = False, storyUri = False)) articles = RequestArticlesInfo( page = 1, count = 100, sortBy = "date", sortByAsc = False, returnInfo = r ) uris = RequestArticlesUriWgtList( page = 1, count = 50000, sortBy = "") time = RequestArticlesTimeAggr() q.setRequestedResult(articles) results = er.execQuery(q) print(results) with open(outfile, "w") as fp: json.dump(results, fp)
if name == "main":
query("./data/test.json", { "keywords": "Apple", "concepts": "https://en.wikipedia.org/wiki/Apple_Inc.", "categories": None, "sources": None, "rankStart": 0, "rankEnd": 100 }
`
The text was updated successfully, but these errors were encountered:
Just found out what the problem was: my uri wikpedia link has an "https://..." not an "http://.."!
Sorry, something went wrong.
No branches or pull requests
Hi, I'm just trying to do a standard concept query and I'm getting 0 results. What am I doing wrong?
`
TRAINING_STARTDATE = date(year = 2014, month = 1, day = 1)
TRAINING_ENDDATE = date(year = 2019, month = 3, day = 13)
def query(outfile, params):
q = QueryArticles(
keywords = params["keywords"],
conceptUri = "https://en.wikipedia.org/wiki/Apple_Inc.",
categoryUri = params["categories"],
sourceUri = params["sources"],
sourceLocationUri = None,
sourceGroupUri = None,
authorUri = None,
locationUri = None,
lang = "eng",
dateStart = TRAINING_ENDDATE - datetime.timedelta(days=7),
dateEnd = TRAINING_ENDDATE,
dateMentionStart = None,
dateMentionEnd = None,
keywordsLoc = "title",
ignoreKeywords = None,
ignoreConceptUri = None,
ignoreCategoryUri = None,
ignoreSourceUri = None,
ignoreSourceLocationUri = None,
ignoreSourceGroupUri = None,
ignoreAuthorUri = None,
ignoreLocationUri = None,
ignoreLang = None,
ignoreKeywordsLoc = "body",
isDuplicateFilter = "keepAll",
hasDuplicateFilter = "keepAll",
eventFilter = "keepAll",
startSourceRankPercentile = params["rankStart"], #experiment with this
endSourceRankPercentile = params["rankEnd"],
dataType = ["news", "pr", "blogs"])
if name == "main":
`
The text was updated successfully, but these errors were encountered: