From 2808ae0b59a3362cf7e65265282777536cfe6bec Mon Sep 17 00:00:00 2001 From: Angel osim <69635048+Otom-obhazi@users.noreply.github.com> Date: Sun, 24 Nov 2024 13:35:12 +0100 Subject: [PATCH] Create prepositions.sparql (#512) * Create prepositions.sparql * Put Danish prepositions query into a directory * Change path and pkg_config_path for macOS CI build * Set path for macOS ci build * Set path and path_config_path as done in PyICU docs * Try overwriting pkgconf in macOS CI build * Trying overwriting pkgconf before installing new one * Try just installing icu4u with assumption that pkg-conf is set --------- Co-authored-by: Andrew Tavis McAllister --- .github/workflows/python_package_ci.yaml | 9 ++++----- .../danish/prepositions/prepositions.sparql | 14 ++++++++++++++ 2 files changed, 18 insertions(+), 5 deletions(-) create mode 100644 src/scribe_data/wikidata/language_data_extraction/danish/prepositions/prepositions.sparql diff --git a/.github/workflows/python_package_ci.yaml b/.github/workflows/python_package_ci.yaml index 839f5314..4f5794ef 100644 --- a/.github/workflows/python_package_ci.yaml +++ b/.github/workflows/python_package_ci.yaml @@ -48,11 +48,10 @@ jobs: - name: Install PyICU dependencies if: matrix.os == 'macos-latest' run: | - brew bundle install --file=Brewfile - # configure PATH & PKG_CONFIG_PATH as per - # https://gitlab.pyicu.org/main/pyicu - echo "/opt/homebrew/opt/icu4c/bin:/opt/homebrew/opt/icu4c/sbin:$PATH" >> $GITHUB_PATH - echo "PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/opt/homebrew/opt/icu4c/lib/pkgconfig" >> $GITHUB_ENV + brew install icu4c + # Configure PATH & PKG_CONFIG_PATH as in https://gitlab.pyicu.org/main/pyicu. + export PATH="$(brew --prefix)/opt/icu4c/bin:$(brew --prefix)/opt/icu4c/sbin:$PATH" + export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$(brew --prefix)/opt/icu4c/lib/pkgconfig" - name: Install Python Dependencies run: | diff --git a/src/scribe_data/wikidata/language_data_extraction/danish/prepositions/prepositions.sparql b/src/scribe_data/wikidata/language_data_extraction/danish/prepositions/prepositions.sparql new file mode 100644 index 00000000..0b06b531 --- /dev/null +++ b/src/scribe_data/wikidata/language_data_extraction/danish/prepositions/prepositions.sparql @@ -0,0 +1,14 @@ +# tool: scribe-data +# All Danish (Q9035) prepositions (Q4833830) and the given forms. +# Enter this query at https://query.wikidata.org/. + +SELECT + (REPLACE(STR(?lexeme), "http://www.wikidata.org/entity/", "") AS ?lexemeID) + ?preposition + ?case + +WHERE { + ?lexeme dct:language wd:Q9035 ; + wikibase:lexicalCategory wd:Q4833830 ; + wikibase:lemma ?preposition . +}