Skip to content
New issue

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

Service question generator #132

Merged
merged 27 commits into from
Apr 29, 2024
Merged
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
2d6536c
Merge branch 'develop' into wikidata_queries
uo288574 Mar 29, 2024
7f0fb21
Merge branch 'develop' into wikidata_queries
uo288574 Apr 1, 2024
73efd4c
new queries
uo288574 Apr 8, 2024
c00bc9d
borrada query innecesaria
uo288574 Apr 10, 2024
d02d9dd
Merge branch 'master' into wikidata_queries
uo288574 Apr 12, 2024
4a35c17
consultation for country and monument
uo288574 Apr 12, 2024
c2ee62c
F1 queries
uo288574 Apr 14, 2024
75d3e62
sport queries
uo288574 Apr 18, 2024
ac99ae5
new query
uo288574 Apr 18, 2024
7808ccd
Refactoriced WikidataExtractor in order to make it extensible and to …
AbelMH1 Apr 25, 2024
431dea8
Merge branch 'wikidata_queries' into service_question_generator
AbelMH1 Apr 25, 2024
3dcc27d
Añadido filtro a los datos obtenidos de wikidata para los campos no d…
AbelMH1 Apr 25, 2024
60af73c
Fixed bug that was producing the queries to be executed when starting…
AbelMH1 Apr 25, 2024
6a6f533
Added the chemical elements data extraction
AbelMH1 Apr 26, 2024
d36c800
Added queries and templates for extracting data about different topics
AbelMH1 Apr 26, 2024
351dd34
Added the extraction templates for new data topics and a new method t…
AbelMH1 Apr 28, 2024
295bb61
Fixed languaje on the query MonumentoYPais
AbelMH1 Apr 28, 2024
850ae58
Moddified the information showed in the WikidataExtractor console logs
AbelMH1 Apr 28, 2024
1adf724
Modified the information showed in the QuestionGenerator console logs
AbelMH1 Apr 28, 2024
4560018
Commented Develop only endpoints
AbelMH1 Apr 28, 2024
4f29434
npm audit fix
AbelMH1 Apr 28, 2024
75489c4
Added containers to the sonar-cloud code checker
AbelMH1 Apr 28, 2024
12b75bd
Merge branch 'develop' into service_question_generator
AbelMH1 Apr 28, 2024
e0624cf
Trying to clean my code
AbelMH1 Apr 29, 2024
a6f912c
Extracted the identical data models from the two services to a common…
AbelMH1 Apr 29, 2024
f3b4bfd
Corrected the data extraction interval time for production
AbelMH1 Apr 29, 2024
38288c2
Merge branch 'develop' into service_question_generator
AbelMH1 Apr 29, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Añadido filtro a los datos obtenidos de wikidata para los campos no d…
…efinidos (los que ponen "Q1234" o similares)
  • Loading branch information
AbelMH1 committed Apr 25, 2024
commit 3dcc27d262b446218181890453cc4846aa314ffb
8 changes: 7 additions & 1 deletion questionsservice/wikidataExtractor/wikidataQueries.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ const wikidata = require("./wikidataConnexion");

class WikiQueries {

static regExp = /^Q\d+$/; // Expresión regular para filtrar las etiquetas del tipo "Q1234"

/* CIENCIA */

static async obtenerSimboloQuimico() {
Expand Down Expand Up @@ -33,7 +35,11 @@ class WikiQueries {

const results = await wikidata.consulta(query);
// console.log(results)
return results;
return results.filter(function(element) {
const countryOk = !WikiQueries.regExp.test(element.countryLabel);
const capitalOk = !WikiQueries.regExp.test(element.capitalLabel);
return countryOk && capitalOk;
});
}

static async obtenerPaisYBandera() {
Expand Down