├── .gitattributes
├── .github
└── workflows
│ ├── codeql-analysis.yml
│ └── python-package.yml
├── .gitignore
├── .jshintrc
├── CONTRIBUTING.md
├── LICENSE.txt
├── README.md
├── article.py
├── config
├── Greynir.conf
├── GreynirSimple.conf
├── Index.conf
├── greynir.is.conf
└── gunicorn_config.py
├── db
├── __init__.py
├── models.py
├── setup.py
└── sql.py
├── docs
├── setup_linux.md
├── setup_macos.md
└── shell.md
├── fetcher.py
├── geo.py
├── images.py
├── main.py
├── nertokenizer.py
├── nn
├── __init__.py
├── api.py
├── client.py
├── nnclient.py
├── nntree.py
├── tests.py
└── utils.py
├── postagger.py
├── processor.py
├── processors
├── README.md
├── __init__.py
├── disabled
│ └── attribs.py
├── entities.py
├── locations.py
└── persons.py
├── queries
├── README.md
├── __init__.py
├── arithmetic.py
├── atm.py
├── builtin.py
├── bus.py
├── counting.py
├── currency.py
├── date.py
├── dictionary.py
├── disabled
│ └── .gitkeep
├── distance.py
├── examples
│ ├── english.py
│ ├── grammar.py
│ └── plaintext.py
├── flights.py
├── geography.py
├── gpt.py
├── grammars
│ ├── README.md
│ ├── arithmetic.grammar
│ ├── atm.grammar
│ ├── builtin.grammar
│ ├── bus.grammar
│ ├── counting.grammar
│ ├── currency.grammar
│ ├── date.grammar
│ ├── dictionary.grammar
│ ├── flights.grammar
│ ├── geography.grammar
│ ├── ja.grammar
│ ├── news.grammar
│ ├── opinion.grammar
│ ├── petrol.grammar
│ ├── pic.grammar
│ ├── places.grammar
│ ├── rand.grammar
│ ├── root.grammar
│ ├── schedules.grammar
│ ├── sunpos.grammar
│ ├── unit.grammar
│ ├── userloc.grammar
│ ├── weather.grammar
│ ├── whatis.grammar
│ ├── wiki.grammar
│ └── yulelads.grammar
├── ja.py
├── js
│ └── .gitkeep
├── news.py
├── opinion.py
├── petrol.py
├── pic.py
├── places.py
├── play.py
├── rand.py
├── repeat.py
├── resources
│ └── .gitkeep
├── schedules.py
├── special.py
├── stats.py
├── sunpos.py
├── tel.py
├── test.py
├── time.py
├── unit.py
├── userinfo.py
├── userloc.py
├── util
│ ├── __init__.py
│ ├── cardinals.py
│ ├── grammars
│ │ ├── cardinals.grammar
│ │ └── ordinals.grammar
│ ├── openai_gpt.py
│ └── ordinals.py
├── weather.py
├── whatis.py
├── wiki.py
├── words.py
└── yulelads.py
├── requirements.txt
├── resources
└── geo
│ ├── cities_is.json
│ ├── country_data.json
│ ├── iceloc_prep.json
│ ├── us_state_coords.json
│ └── us_state_name2code.json
├── routes
├── __init__.py
├── api.py
├── loc.py
├── main.py
├── news.py
├── people.py
├── salescloud.py
├── stats.py
└── words.py
├── scraper.py
├── scrapers
├── README.md
├── __init__.py
└── default.py
├── scripts
├── .ipython.py
├── deploy.sh
├── gen_embla_rec.sh
├── prune_queries.sh
├── runreparse.sh
├── runscraper.sh
├── runtagger.sh
├── shell.sh
├── start.sh
└── tts_audio_cleanup.sh
├── search.py
├── settings.py
├── similar.py
├── static
├── 404.html
├── 500.html
├── audio
│ └── tmp
│ │ └── .gitkeep
├── browserconfig.xml
├── css
│ ├── jquery-jvectormap-2.0.3.css
│ └── main-bootstrap.css
├── files
│ └── Greynir-Terms-2020-03-11.pdf
├── fonts
│ ├── glyphicons-regular.woff
│ ├── glyphicons-regular.woff2
│ ├── lato-v16-latin-700.woff
│ ├── lato-v16-latin-700.woff2
│ ├── lato-v16-latin-700italic.woff
│ ├── lato-v16-latin-700italic.woff2
│ ├── lato-v16-latin-italic.woff
│ ├── lato-v16-latin-italic.woff2
│ ├── lato-v16-latin-regular.woff
│ ├── lato-v16-latin-regular.woff2
│ ├── oswald-v31-latin-regular.woff
│ └── oswald-v31-latin-regular.woff2
├── img
│ ├── Blurb1.png
│ ├── GPLv3.png
│ ├── GreynirLogoHoriz180x80.png
│ ├── GreynirLogoVertical.png
│ ├── GreynirLogoVertical200.png
│ ├── android-icon-144x144.png
│ ├── android-icon-192x192.png
│ ├── android-icon-36x36.png
│ ├── android-icon-48x48.png
│ ├── android-icon-72x72.png
│ ├── android-icon-96x96.png
│ ├── apple-icon-114x114.png
│ ├── apple-icon-120x120.png
│ ├── apple-icon-144x144.png
│ ├── apple-icon-152x152.png
│ ├── apple-icon-180x180.png
│ ├── apple-icon-57x57.png
│ ├── apple-icon-60x60.png
│ ├── apple-icon-72x72.png
│ ├── apple-icon-76x76.png
│ ├── apple-icon-precomposed.png
│ ├── apple-icon.png
│ ├── favicon-16x16.png
│ ├── favicon-32x32.png
│ ├── favicon-96x96.png
│ ├── favicon.ico
│ ├── flags
│ │ ├── AD.png
│ │ ├── AE.png
│ │ ├── AF.png
│ │ ├── AG.png
│ │ ├── AI.png
│ │ ├── AL.png
│ │ ├── AM.png
│ │ ├── AN.png
│ │ ├── AO.png
│ │ ├── AQ.png
│ │ ├── AR.png
│ │ ├── AS.png
│ │ ├── AT.png
│ │ ├── AU.png
│ │ ├── AW.png
│ │ ├── AX.png
│ │ ├── AZ.png
│ │ ├── BA.png
│ │ ├── BB.png
│ │ ├── BD.png
│ │ ├── BE.png
│ │ ├── BF.png
│ │ ├── BG.png
│ │ ├── BH.png
│ │ ├── BI.png
│ │ ├── BJ.png
│ │ ├── BL.png
│ │ ├── BM.png
│ │ ├── BN.png
│ │ ├── BO.png
│ │ ├── BQ.png
│ │ ├── BR.png
│ │ ├── BS.png
│ │ ├── BT.png
│ │ ├── BV.png
│ │ ├── BW.png
│ │ ├── BY.png
│ │ ├── BZ.png
│ │ ├── CA.png
│ │ ├── CC.png
│ │ ├── CD.png
│ │ ├── CF.png
│ │ ├── CG.png
│ │ ├── CH.png
│ │ ├── CI.png
│ │ ├── CK.png
│ │ ├── CL.png
│ │ ├── CM.png
│ │ ├── CN.png
│ │ ├── CO.png
│ │ ├── CR.png
│ │ ├── CU.png
│ │ ├── CV.png
│ │ ├── CW.png
│ │ ├── CX.png
│ │ ├── CY.png
│ │ ├── CZ.png
│ │ ├── DE.png
│ │ ├── DJ.png
│ │ ├── DK.png
│ │ ├── DM.png
│ │ ├── DO.png
│ │ ├── DZ.png
│ │ ├── EC.png
│ │ ├── EE.png
│ │ ├── EG.png
│ │ ├── EH.png
│ │ ├── ER.png
│ │ ├── ES.png
│ │ ├── ET.png
│ │ ├── EU.png
│ │ ├── FI.png
│ │ ├── FJ.png
│ │ ├── FK.png
│ │ ├── FM.png
│ │ ├── FO.png
│ │ ├── FR.png
│ │ ├── GA.png
│ │ ├── GB-ENG.png
│ │ ├── GB-NIR.png
│ │ ├── GB-SCT.png
│ │ ├── GB-WLS.png
│ │ ├── GB.png
│ │ ├── GD.png
│ │ ├── GE.png
│ │ ├── GF.png
│ │ ├── GG.png
│ │ ├── GH.png
│ │ ├── GI.png
│ │ ├── GL.png
│ │ ├── GM.png
│ │ ├── GN.png
│ │ ├── GP.png
│ │ ├── GQ.png
│ │ ├── GR.png
│ │ ├── GS.png
│ │ ├── GT.png
│ │ ├── GU.png
│ │ ├── GW.png
│ │ ├── GY.png
│ │ ├── HK.png
│ │ ├── HM.png
│ │ ├── HN.png
│ │ ├── HR.png
│ │ ├── HT.png
│ │ ├── HU.png
│ │ ├── IC.png
│ │ ├── ID.png
│ │ ├── IE.png
│ │ ├── IL.png
│ │ ├── IM.png
│ │ ├── IN.png
│ │ ├── IO.png
│ │ ├── IQ.png
│ │ ├── IR.png
│ │ ├── IS.png
│ │ ├── IT.png
│ │ ├── JE.png
│ │ ├── JM.png
│ │ ├── JO.png
│ │ ├── JP.png
│ │ ├── KE.png
│ │ ├── KG.png
│ │ ├── KH.png
│ │ ├── KI.png
│ │ ├── KM.png
│ │ ├── KN.png
│ │ ├── KP.png
│ │ ├── KR.png
│ │ ├── KW.png
│ │ ├── KY.png
│ │ ├── KZ.png
│ │ ├── LA.png
│ │ ├── LB.png
│ │ ├── LC.png
│ │ ├── LI.png
│ │ ├── LK.png
│ │ ├── LR.png
│ │ ├── LS.png
│ │ ├── LT.png
│ │ ├── LU.png
│ │ ├── LV.png
│ │ ├── LY.png
│ │ ├── MA.png
│ │ ├── MC.png
│ │ ├── MD.png
│ │ ├── ME.png
│ │ ├── MF.png
│ │ ├── MG.png
│ │ ├── MH.png
│ │ ├── MK.png
│ │ ├── ML.png
│ │ ├── MM.png
│ │ ├── MN.png
│ │ ├── MO.png
│ │ ├── MP.png
│ │ ├── MQ.png
│ │ ├── MR.png
│ │ ├── MS.png
│ │ ├── MT.png
│ │ ├── MU.png
│ │ ├── MV.png
│ │ ├── MW.png
│ │ ├── MX.png
│ │ ├── MY.png
│ │ ├── MZ.png
│ │ ├── NA.png
│ │ ├── NC.png
│ │ ├── NE.png
│ │ ├── NF.png
│ │ ├── NG.png
│ │ ├── NI.png
│ │ ├── NL.png
│ │ ├── NO.png
│ │ ├── NP.png
│ │ ├── NR.png
│ │ ├── NU.png
│ │ ├── NZ.png
│ │ ├── OM.png
│ │ ├── PA.png
│ │ ├── PE.png
│ │ ├── PF.png
│ │ ├── PG.png
│ │ ├── PH.png
│ │ ├── PK.png
│ │ ├── PL.png
│ │ ├── PM.png
│ │ ├── PN.png
│ │ ├── PR.png
│ │ ├── PS.png
│ │ ├── PT.png
│ │ ├── PW.png
│ │ ├── PY.png
│ │ ├── QA.png
│ │ ├── RE.png
│ │ ├── RO.png
│ │ ├── RS.png
│ │ ├── RU.png
│ │ ├── RW.png
│ │ ├── SA.png
│ │ ├── SB.png
│ │ ├── SC.png
│ │ ├── SD.png
│ │ ├── SE.png
│ │ ├── SG.png
│ │ ├── SH.png
│ │ ├── SI.png
│ │ ├── SJ.png
│ │ ├── SK.png
│ │ ├── SL.png
│ │ ├── SM.png
│ │ ├── SN.png
│ │ ├── SO.png
│ │ ├── SR.png
│ │ ├── SS.png
│ │ ├── ST.png
│ │ ├── SV.png
│ │ ├── SX.png
│ │ ├── SY.png
│ │ ├── SZ.png
│ │ ├── TC.png
│ │ ├── TD.png
│ │ ├── TF.png
│ │ ├── TG.png
│ │ ├── TH.png
│ │ ├── TJ.png
│ │ ├── TK.png
│ │ ├── TL.png
│ │ ├── TM.png
│ │ ├── TN.png
│ │ ├── TO.png
│ │ ├── TR.png
│ │ ├── TT.png
│ │ ├── TV.png
│ │ ├── TW.png
│ │ ├── TZ.png
│ │ ├── UA.png
│ │ ├── UG.png
│ │ ├── UM.png
│ │ ├── US.png
│ │ ├── UY.png
│ │ ├── UZ.png
│ │ ├── VA.png
│ │ ├── VC.png
│ │ ├── VE.png
│ │ ├── VG.png
│ │ ├── VI.png
│ │ ├── VN.png
│ │ ├── VU.png
│ │ ├── WF.png
│ │ ├── WS.png
│ │ ├── XK.png
│ │ ├── XS.png
│ │ ├── YE.png
│ │ ├── YT.png
│ │ ├── ZA.png
│ │ ├── ZM.png
│ │ └── ZW.png
│ ├── greynir-logo-large.png
│ ├── greynir_opengraph.png
│ ├── maps
│ │ ├── continents
│ │ │ ├── AF.png
│ │ │ ├── AN.png
│ │ │ ├── AS.png
│ │ │ ├── EU.png
│ │ │ ├── NA.png
│ │ │ ├── OC.png
│ │ │ └── SA.png
│ │ └── regions
│ │ │ ├── Austfirðir.png
│ │ │ ├── Austurland.png
│ │ │ ├── Mið-Austurland.png
│ │ │ ├── Norðausturland.png
│ │ │ ├── Norðurland.png
│ │ │ ├── Norðvesturland.png
│ │ │ ├── Suðurland.png
│ │ │ ├── Suðurnes.png
│ │ │ ├── Suðvesturland.png
│ │ │ ├── Vestfirðir.png
│ │ │ └── Vesturland.png
│ ├── mideind-horizontal-large.png
│ ├── mideind-horizontal-small.png
│ ├── mideind-logo-transparent-medium.png
│ ├── ms-icon-144x144.png
│ ├── ms-icon-150x150.png
│ ├── ms-icon-310x310.png
│ ├── ms-icon-70x70.png
│ ├── placeholder.png
│ ├── sources
│ │ ├── bb.is.png
│ │ ├── bbl.is.png
│ │ ├── dv.is.png
│ │ ├── eyjan.pressan.is.png
│ │ ├── fjarmalaraduneyti.is.png
│ │ ├── forsaetisraduneyti.is.png
│ │ ├── frettabladid.is.png
│ │ ├── hagstofa.is.png
│ │ ├── heimildin.is.png
│ │ ├── hringbraut.is.png
│ │ ├── innanrikisraduneyti.is.png
│ │ ├── kjarninn.is.png
│ │ ├── kvennabladid.is.png
│ │ ├── lemurinn.is.png
│ │ ├── mannlif.is.png
│ │ ├── mbl.is.png
│ │ ├── ruv.is.png
│ │ ├── samstodin.is.png
│ │ ├── sedlabanki.is.png
│ │ ├── stjornlagarad.is.png
│ │ ├── stundin.is.png
│ │ ├── utanrikisraduneyti.is.png
│ │ ├── vb.is.png
│ │ ├── visindavefur.is.png
│ │ └── visir.is.png
│ ├── tree-example-small.png
│ ├── tree-example.png
│ └── vth.jpg
├── js
│ ├── common.js
│ ├── ext
│ │ ├── jquery-jvectormap-2.0.3.min.js
│ │ └── jquery-jvectormap-world-mill.js
│ ├── front.js
│ ├── page.js
│ └── translation.js
├── manifest.json
└── robots.txt
├── templates
├── 404.html
├── 500.html
├── about.html
├── analysis.html
├── apidoc.html
├── articles.html
├── buy.html
├── container-fluid.html
├── container-normal.html
├── container.html
├── hover-infobox.html
├── locations
│ ├── icemap.html
│ ├── top.html
│ └── worldmap.html
├── main.html
├── news.html
├── page.html
├── parsefail.html
├── people
│ ├── graph.html
│ ├── recent.html
│ ├── timeline.html
│ └── top.html
├── similar.html
├── stats-queries.html
├── stats.html
├── terms.html
├── translate.html
├── treegrid.html
└── words
│ ├── details.html
│ ├── freq.html
│ └── trends.html
├── tests
├── files
│ ├── dummy_atm_data.json
│ ├── dummy_greynir_api_key.txt
│ ├── dummy_json_api_key.json
│ └── populate_testdb.sql
├── test_greynir.py
├── test_processors.py
├── test_queries.py
└── test_util.py
├── tnttagger.py
├── tools
├── addgender.py
├── bracket.py
├── cmp.py
├── cmp_parse.py
├── dbclean.py
├── dump_articles.py
├── dumper.py
├── gen_copper_corpus.py
├── gen_silver_corpus.py
├── gencorp.py
├── get_articles_by_url.py
├── grammar_gen.py
├── kn.py
├── langdetect.py
├── lookup.py
├── mim.py
├── missing_nouns.py
├── orn.py
├── pairgen.py
├── ptest.py
├── qinfo.py
├── qlog_copy.py
├── showprofile.py
├── specialqmod_fix.py
├── splitcopper.py
├── tagtest.py
├── trainer.py
└── trigrams.py
├── tree
├── __init__.py
└── util.py
├── tts.py
├── utility.py
└── vectors
├── README.md
├── Topics.conf
├── Vectors.conf
├── builder.py
├── requirements.txt
├── settings.py
└── simserver.py
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Set the default line ending behavior to auto
2 | * text=auto
3 |
4 | # Source files should only have LF endings
5 | *.py text eol=lf
6 | *.c text eol=lf
7 | *.h text eol=lf
8 | *.cpp text eol=lf
9 | *.hpp text eol=lf
10 | *.csv text eol=lf
11 | *.grammar text eol=lf
12 | *.yml text eol=lf
13 | *.sh text eol=lf
14 | *.rst text eol=lf
15 | *.md text eol=lf
16 | *.in text eol=lf
17 | *.conf text eol=lf
18 | *.txt text eol=lf
19 | *.html text eol=lf
20 |
21 | # Declare files that will always have CRLF line endings on checkout
22 | *.sln text eol=crlf
23 | *.bat text eol=crlf
24 |
25 | # Denote all files that are truly binary and should not be modified
26 | *.png binary
27 | *.jpg binary
28 | *.bin binary
29 | *.compressed binary
30 |
--------------------------------------------------------------------------------
/.github/workflows/codeql-analysis.yml:
--------------------------------------------------------------------------------
1 | # For most projects, this workflow file will not need changing; you simply need
2 | # to commit it to your repository.
3 | #
4 | # You may wish to alter this file to override the set of languages analyzed,
5 | # or to provide custom queries or build logic.
6 | #
7 | # ******** NOTE ********
8 | # We have attempted to detect the languages in your repository. Please check
9 | # the `language` matrix defined below to confirm you have the correct set of
10 | # supported CodeQL languages.
11 | #
12 | name: "CodeQL"
13 |
14 | on:
15 | push:
16 | branches: [ master ]
17 | pull_request:
18 | # The branches below must be a subset of the branches above
19 | branches: [ master ]
20 | schedule:
21 | - cron: '41 8 * * 3'
22 |
23 | jobs:
24 | analyze:
25 | name: Analyze
26 | runs-on: ubuntu-latest
27 | permissions:
28 | actions: read
29 | contents: read
30 | security-events: write
31 |
32 | strategy:
33 | fail-fast: false
34 | matrix:
35 | language: [ 'javascript', 'python' ]
36 | # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
37 | # Learn more:
38 | # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
39 |
40 | steps:
41 | - name: Checkout repository
42 | uses: actions/checkout@v4
43 |
44 | # Initializes the CodeQL tools for scanning.
45 | - name: Initialize CodeQL
46 | uses: github/codeql-action/init@v1
47 | with:
48 | languages: ${{ matrix.language }}
49 | # If you wish to specify custom queries, you can do so here or in a config file.
50 | # By default, queries listed here will override any specified in a config file.
51 | # Prefix the list here with "+" to use these queries and those in the config file.
52 | # queries: ./path/to/local/query, your-org/your-repo/queries@main
53 |
54 | # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
55 | # If this step fails, then you should remove it and run the build manually (see below)
56 | - name: Autobuild
57 | uses: github/codeql-action/autobuild@v1
58 |
59 | # ℹ️ Command-line programs to run using the OS shell.
60 | # 📚 https://git.io/JvXDl
61 |
62 | # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
63 | # and modify them (or add more) to build your code if your project
64 | # uses a compiled language
65 |
66 | #- run: |
67 | # make bootstrap
68 | # make release
69 |
70 | - name: Perform CodeQL Analysis
71 | uses: github/codeql-action/analyze@v1
72 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Byte-compiled / optimized / DLL files
2 | __pycache__/
3 | .pytest_cache/
4 | .mypy_cache/
5 | typings/
6 | *.py[cod]
7 | *.o
8 | *.so
9 | *.exe
10 |
11 | # Compressed DAWG trees
12 | *.dawg
13 |
14 | # Pickled DAWG trees
15 | *.pickle
16 |
17 | # ngram models
18 | ngram*.txt
19 |
20 | # Mypy
21 | mypy.ini
22 |
23 | # Training data files
24 | *.pairs
25 | *.tgz
26 | *.zip
27 | *.tsv
28 |
29 | # Experimental Python stuff
30 | rnn.py
31 | sudoku.py
32 | locktest.py
33 | ssltest.py
34 | test.py
35 | utils/reykjanes.py
36 |
37 | # Utility stuff
38 | diskuse.sh
39 | go.sh
40 | goss.sh
41 | parse.sh
42 | process.sh
43 | makezip.sh
44 | gfixmain.sh
45 | nnmain.sh
46 |
47 | # Various resource files
48 | resources/*.txt
49 | !resources/formers.txt
50 | !resources/last.txt
51 | !resources/ordalisti.sorted.txt
52 | !resources/obeygd.hreinsad.txt
53 | resources/*.csv
54 | resources/ord.compressed
55 | mim/
56 | ifd/
57 | gold/
58 | logs/
59 | .idea/
60 | .vscode/
61 | node_modules/
62 | cffi_test/
63 | backup/
64 |
65 | # Vectors directory
66 | vectors/resources/
67 | vectors/bz2.py
68 | vectors/gensim-0.13.2/
69 | vectors/numpy-1.11.1/
70 | vectors/models/
71 | vectors/t
72 | vectors/test.py
73 |
74 | # Files that are symlinked into the vectors directory
75 | vectors/db
76 | # vectors/settings.py
77 | vectors/similar.py
78 | vectors/Index.conf
79 |
80 | # JavaScript & Node stuff
81 | .eslintrc.js
82 | package-lock.json
83 | package.json
84 |
85 | # Scratch work files
86 | *.bin
87 | *.sublime-project
88 | *.sublime-workspace
89 | *.code-workspace
90 | *.bak
91 | *.profile
92 | *.log
93 | txt
94 | UnknownVerbs.txt
95 | parse.txt
96 | reduce.txt
97 | reduce-dup.txt
98 | input.txt
99 | nohup.out
100 | postfile.txt
101 |
102 | # Distribution / packaging
103 | .Python
104 | env/
105 | bin/
106 | build/
107 | develop-eggs/
108 | dist/
109 | eggs/
110 | lib/
111 | lib64/
112 | parts/
113 | sdist/
114 | var/
115 | *.egg-info/
116 | .installed.cfg
117 | *.egg
118 | log/
119 | console/
120 | fonts/
121 |
122 | # Virtual environments
123 | venv*
124 | p3*/
125 | p7*/
126 | pypy/
127 | pypy*
128 | pypy39/*
129 | pypy310/*
130 | cpython*/
131 | venv
132 | p312/*
133 | p313/*
134 | p39/*
135 |
136 | # Installer logs
137 | pip-log.txt
138 | pip-delete-this-directory.txt
139 | deploy_done.py
140 |
141 | # Windows image file caches
142 | Thumbs.db
143 | ehthumbs.db
144 |
145 | # Folder config file
146 | Desktop.ini
147 | .DS_Store
148 |
149 | # Recycle Bin used on file shares
150 | $RECYCLE.BIN/
151 |
152 | # Windows Installer files
153 | *.cab
154 | *.msi
155 | *.msm
156 | *.msp
157 |
158 | # API keys (and other text resources)
159 | resources/*
160 | # Allow the geo folder
161 | !resources/geo/
162 |
163 | # Ignore audio files generated by speech synthesis
164 | *.mp3
165 | *.wav
166 | *.pcm
167 | *.ogg
168 | *.opus
169 |
170 | # Env file
171 | .env*
172 |
173 | # Coverage test cache
174 | .coverage
175 |
176 | # Ignore files in the query resources folder
177 | queries/resources/*
178 | !queries/resources/.gitkeep
179 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing to Greynir - Important Information
2 |
3 | Greynir is open source software, licensed under the GNU GPLv3 license.
4 |
5 | Your contributions to this software, via pull requests to
6 | [our GitHub repository](https://github.com/mideind/Greynir) or by other
7 | means, are greatly appreciated. They help the Icelandic language to survive
8 | and thrive in a digital world.
9 |
10 | That said, and to avoid any misunderstanding, we would like to bring your
11 | attention to the following before you decide to contribute to our repository:
12 |
13 | * In order to maximize the impact of Greynir, for as many users and use cases
14 | as possible, the software copyright owner, [Miðeind ehf.](https://mideind.is),
15 | reserves the right to enter into alternative licensing agreements,
16 | differing from the GNU GPLv3, with parties who wish to use this software
17 | in closed or proprietary systems.
18 |
19 | * Your contributions to our repository, if accepted, become an integral part of
20 | the software therein. They will thus necessarily be a part of the
21 | deliverables that would be included under any such alternative licensing
22 | agreements.
23 |
24 | * An unavoidable consequence of this is that **by contributing to our repository,
25 | you are granting us permission, free of charge, to deal in the contributed
26 | software without restriction, including without limitation the rights to use,
27 | copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
28 | the contributed software.** (This language is materially obtained from the
29 | [MIT License](https://opensource.org/licenses/MIT).)
30 |
31 | * The disclaimers of warranty found in the GNU GPLv3 apply to your contributions
32 | in any event.
33 |
34 | ---
35 |
36 | If you have question regarding this, please do not hesitate to contact us at
37 | [mideind@mideind.is](mailto:mideind@mideind.is) for any clarifications before
38 | making your contribution.
39 |
--------------------------------------------------------------------------------
/config/Greynir.conf:
--------------------------------------------------------------------------------
1 | #
2 | # Greynir.conf
3 | #
4 | # Configuration file for Greynir
5 | #
6 | # Copyright (C) 2023 Miðeind ehf.
7 | #
8 | # This program is free software: you can redistribute it and/or modify
9 | # it under the terms of the GNU General Public License as published by
10 | # the Free Software Foundation, either version 3 of the License, or
11 | # (at your option) any later version.
12 | #
13 | # This program is distributed in the hope that it will be useful,
14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | # GNU General Public License for more details.
17 | #
18 | # You should have received a copy of the GNU General Public License
19 | # along with this program. If not, see http://www.gnu.org/licenses/.
20 | #
21 |
22 | [settings]
23 |
24 | debug = true
25 |
26 | # Web server settings
27 |
28 | # Web host address
29 | host = 0.0.0.0
30 | # Web host port is '5000' by default
31 | # port = 5000
32 |
33 | # Scraper database settings
34 |
35 | # db_hostname is 'localhost' by default, but that default can be overridden
36 | # by setting the GREYNIR_DB_HOST environment variable
37 | # db_hostname = localhost
38 |
39 | # db_port is '5432' by default, but that default can be overridden
40 | # by setting the GREYNIR_DB_PORT environment variable
41 | # db_port = 5432
42 |
43 | # Article similarity server settings
44 |
45 | # simserver_host is 'localhost' by default, but that default
46 | # can be overridden by setting the SIMSERVER_HOST environment variable
47 | # simserver_host = localhost
48 |
49 | # simserver_port is '5001' by default, but that default
50 | # can be overridden by setting the SIMSERVER_HOST environment variable
51 | # simserver_port = 5001
52 |
53 | # Configuration of word indexing
54 |
55 | $include Index.conf
56 |
57 |
--------------------------------------------------------------------------------
/config/GreynirSimple.conf:
--------------------------------------------------------------------------------
1 | #
2 | # GreynirSimple.conf
3 | #
4 | # Configuration file for Greynir - simple version
5 | # (only loads the basic web and database configuration;
6 | # skips the lexicon configuration)
7 | #
8 | # Copyright (C) 2023 Miðeind ehf.
9 | #
10 | # This program is free software: you can redistribute it and/or modify
11 | # it under the terms of the GNU General Public License as published by
12 | # the Free Software Foundation, either version 3 of the License, or
13 | # (at your option) any later version.
14 | #
15 | # This program is distributed in the hope that it will be useful,
16 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 | # GNU General Public License for more details.
19 | #
20 | # You should have received a copy of the GNU General Public License
21 | # along with this program. If not, see http://www.gnu.org/licenses/.
22 | #
23 |
24 | [settings]
25 |
26 | debug = true
27 |
28 | # Web host address
29 | host = 0.0.0.0
30 |
31 | # db_hostname is 'localhost' by default, but can also be overridden
32 | # by setting the GREYNIR_DB_HOST environment variable
33 | # db_hostname = localhost
34 |
35 | # db_port is '5432' by default, but can also be overridden
36 | # by setting the GREYNIR_DB_PORT environment variable
37 | # db_port = 5432
38 |
39 |
--------------------------------------------------------------------------------
/config/Index.conf:
--------------------------------------------------------------------------------
1 |
2 | #
3 | # Index.conf
4 | #
5 | # Word indexing configuration
6 | #
7 | # This file is included in Main.conf and Vectors.conf
8 | #
9 |
10 |
11 | # Words that should not be indexed in the words table
12 |
13 | [noindex_words]
14 |
15 | category = so
16 |
17 | vera
18 | verða
19 | ætla
20 | telja
21 | segja
22 | geta
23 | hefja
24 | gera
25 | þurfa
26 | hafa
27 | eiga
28 | koma
29 | fara
30 | taka
31 | fá
32 | munu
33 | skulu
34 | vilja
35 | halda
36 | gefa
37 | sjá
38 | mega
39 | ná
40 | láta
41 | finna
42 | bera
43 | reyna
44 | standa
45 | leggja
46 | setja
47 |
48 | category = lo
49 |
50 | stór
51 | lítill
52 | mikill
53 | margur
54 | langur
55 | stuttur
56 | einn
57 | eins
58 | fyrstur
59 | annar
60 | þriðji
61 | fjórði
62 | síður
63 | fyrri
64 | síðari
65 | næstur
66 | svona
67 | ýmislegur
68 | nýr
69 |
70 | category = hk
71 |
72 | ár
73 | es
74 | mál
75 | lán
76 | land
77 | Ísland
78 | tweet
79 |
80 | category = kk
81 |
82 | maður
83 | dagur
84 |
85 | category = kvk
86 |
87 | mynd
88 | vika
89 |
90 |
--------------------------------------------------------------------------------
/config/gunicorn_config.py:
--------------------------------------------------------------------------------
1 | # Gunicorn configuration file for greynir.is
2 |
3 | DIR = "/usr/share/nginx/greynir.is/"
4 |
5 | bind = "unix:" + DIR + "gunicorn.sock"
6 | worker_class = "eventlet"
7 | workers = 3
8 | threads = 2
9 | timeout = 120
10 |
11 | # Read user and group name from text config file
12 | with open(DIR + "gunicorn_user.txt") as f:
13 | user = f.readline().strip()
14 | group = f.readline().strip()
15 |
16 | pidfile = DIR + "gunicorn.pid"
17 |
18 | # Remove the Greynir.grammar.bin file to ensure that
19 | # the grammar will be reparsed and a fresh copy generated
20 |
21 | import os
22 |
23 | try:
24 | os.remove(DIR + "Greynir.grammar.bin")
25 | except OSError:
26 | # File probably didn't exist
27 | pass
28 |
--------------------------------------------------------------------------------
/docs/shell.md:
--------------------------------------------------------------------------------
1 | # Using the Greynir Shell
2 |
3 | To start the Greynir shell, activate the virtual environment and install IPython:
4 |
5 | ```bash
6 | pip install ipython
7 | ```
8 |
9 | You can then run the following command from the repository root:
10 |
11 | ```bash
12 | bash scripts/shell.sh
13 | ```
14 |
15 | This will launch an [IPython](http://ipython.readthedocs.io) shell, a superior alternative to the standard Python REPL. Features include syntax highlighting, auto-pretty-printing, auto-indentation, smart autocompletion, persistent history across sessions, integrated access to pdb and the profiler, and various introspection tools.
16 |
17 | To enable auto-reloading of modules prior to every command, run the following command:
18 |
19 | ```python
20 | %autoreload 2
21 | ```
22 |
23 | The shell has been configured to automatically import Greynir's database models and create a (commit-disabled) database session when launched. The Greynir parser is also imported.
24 |
25 | * `s` - SQLAlchemy database session
26 | * `g` - Instance of the [Greynir](https://github.com/mideind/GreynirEngine) parser.
27 |
28 | For an overview of Greynir's database models, see `db/models.py`.
29 |
30 | Shell auto-imports are configured in `.ipython.py` in the repository root. Additional local user settings can be configured in `~/.ipython/profile_default`.
31 |
32 | ### Querying the database
33 |
34 | Get the titles of recent articles:
35 |
36 | ```python
37 | In [1]: s.query(Article.heading).order_by(desc(Article.timestamp)) \
38 | ...: .limit(5).all()
39 | Out[1]:
40 | [('Guðjón Pétur í KA'),
41 | ('Parkland-ungmennin sem breyttu heiminum'),
42 | ('Airwaves-helgin gerð upp'),
43 | ('Sturridge í vondum málum?'),
44 | ('Óttar ekki áfram hjá Trelleborg')]
45 | ```
46 |
47 | Show recent persons identified by Greynir's Named Entity Recognition module:
48 |
49 | ```
50 | In [1]: s.query(Person.name, Person.title) \
51 | ...: .order_by(Person.timestamp).limit(5).all()
52 | Out[6]:
53 | [('Þórður Snær Júlíusson', 'ritstjóri Kjarnans'),
54 | ('Jón Magnús Kristjánsson', 'yfirlæknir bráðalækninga á Landspítalanum'),
55 | ('Davíð Oddsson', 'ritstjóri Morgunblaðsins'),
56 | ('Þórdís Kolbrún Reykfjörð Gylfadóttir', 'varaformaður Sjálfstæðisflokksins'),
57 | ('Ingólfur Helgason', 'fyrrverandi forstjóri Kaupþings á Íslandi')]
58 | ```
59 |
60 | ### Parsing with Greynir
61 |
62 | ```
63 | In [1]: sent = g.parse_single("Mikið væri það skemmtilegt fyrir Gunna.")
64 | In [2]: print(sent.tree.view)
65 | Out[2]:
66 | P
67 | +-S-MAIN
68 | +-IP
69 | +-ADVP
70 | +-ao: 'Mikið'
71 | +-VP-SEQ
72 | +-VP
73 | +-so_et_p3: 'væri'
74 | +-NP-SUBJ
75 | +-pfn_hk_et_nf: 'það'
76 | +-ADJP
77 | +-lo_sb_nf_et_hk: 'skemmtilegt'
78 | +-PP
79 | +-fs_þf: 'fyrir'
80 | +-NP
81 | +-person_þf_kk: 'Gunna'
82 | +-'.'
83 | In [3]: sent.tree.nouns
84 | Out[3]: ['Gunni']
85 | In [4]: sent.tree.lemmas
86 | Out[4]: ['mikið', 'vera', 'það', 'skemmtilegur', 'fyrir', 'Gunni', '.']
87 |
88 | ```
89 |
--------------------------------------------------------------------------------
/nn/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/nn/__init__.py
--------------------------------------------------------------------------------
/nn/tests.py:
--------------------------------------------------------------------------------
1 | # type: ignore
2 | """
3 | Greynir: Natural language processing for Icelandic
4 |
5 | Copyright (C) 2023 Miðeind ehf.
6 |
7 | This program is free software: you can redistribute it and/or modify
8 | it under the terms of the GNU General Public License as published by
9 | the Free Software Foundation, either version 3 of the License, or
10 | (at your option) any later version.
11 | This program is distributed in the hope that it will be useful,
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | GNU General Public License for more details.
15 |
16 | You should have received a copy of the GNU General Public License
17 | along with this program. If not, see http://www.gnu.org/licenses/.
18 | """
19 |
20 | from nn.nntree import (
21 | tokenize_and_merge_possible_mw_tokens, # type: ignore
22 | flat_matching_nonterminal, # type: ignore
23 | flat_is_terminal, # type: ignore
24 | flat_is_nonterminal, # type: ignore
25 | )
26 |
27 |
28 | def test_merge_person():
29 | text = "Ingibjörg Sólrún Gísladóttir mun a.m.k. hitta hópinn á morgun"
30 | flat_tree = "P S-MAIN IP NP-SUBJ person_kvk_nf person_kvk_nf person_kvk_nf /NP-SUBJ VP-SEQ VP so_et_fh_gm_nt_p3 ADVP ao /ADVP so_1_þf_gm_nh NP-OBJ no_et_gr_kk_þf /NP-OBJ /VP ADVP ADVP-DATE-REL ao ao /ADVP-DATE-REL /ADVP /VP-SEQ /IP /S-MAIN /P"
31 | text_toks, _ = tokenize_and_merge_possible_mw_tokens(text, flat_tree)
32 | assert len(text_toks) == 6
33 |
34 |
35 | def test_merge_ao():
36 | text = "Ingibjörg Sólrún Gísladóttir mun a.m.k. hitta hópinn á morgun"
37 | flat_tree = "P S-MAIN IP NP-SUBJ person_kvk_nf no_kvk_nf person_kvk_nf /NP-SUBJ VP-SEQ VP so_et_fh_gm_nt_p3 ADVP ao /ADVP so_1_þf_gm_nh NP-OBJ no_et_gr_kk_þf /NP-OBJ /VP ADVP ADVP-DATE-REL ao ao /ADVP-DATE-REL /ADVP /VP-SEQ /IP /S-MAIN /P"
38 | text_toks, _ = tokenize_and_merge_possible_mw_tokens(text, flat_tree)
39 | assert len(text_toks) == 8
40 |
41 |
42 | def test_no_merge():
43 | text = "Ingibjörg Sólrún Gísladóttir mun a.m.k. hitta hópinn á morgun"
44 | flat_tree = "P S-MAIN IP NP-SUBJ person_kvk_nf no_kvk_nf person_kvk_nf /NP-SUBJ VP-SEQ VP so_et_fh_gm_nt_p3 ADVP ao /ADVP so_1_þf_gm_nh NP-OBJ no_et_gr_kk_þf /NP-OBJ /VP ADVP ADVP-DATE-REL fs ao /ADVP-DATE-REL /ADVP /VP-SEQ /IP /S-MAIN /P"
45 | text_toks, _ = tokenize_and_merge_possible_mw_tokens(text, flat_tree)
46 | assert len(text_toks) == 9
47 |
48 |
49 | def test_flat_fns():
50 | nonterms = ["P", "S0", "NP-SUBJ"]
51 | for nt in nonterms:
52 | assert flat_is_nonterminal(nt), "{} should be nonterminal".format(nt)
53 | match = ["/NP-SUBJ", "NP-SUBJ"]
54 | assert flat_matching_nonterminal(match[0]) == match[1], "{} should match {}".format(
55 | *match
56 | )
57 | assert flat_matching_nonterminal(match[1]) == match[0], "{} should match {}".format(
58 | *match
59 | )
60 | terms = ["so_1_nf_et_fh_gm_nt_p3", "lo_et_hk_þf", "tö"]
61 | for term in terms:
62 | assert flat_is_terminal(term), "{} should be terminal".format(term)
63 |
--------------------------------------------------------------------------------
/nn/utils.py:
--------------------------------------------------------------------------------
1 | """
2 | Greynir: Natural language processing for Icelandic
3 |
4 | Copyright (C) 2023 Miðeind ehf.
5 |
6 | This program is free software: you can redistribute it and/or modify
7 | it under the terms of the GNU General Public License as published by
8 | the Free Software Foundation, either version 3 of the License, or
9 | (at your option) any later version.
10 | This program is distributed in the hope that it will be useful,
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | GNU General Public License for more details.
14 |
15 | You should have received a copy of the GNU General Public License
16 | along with this program. If not, see http://www.gnu.org/licenses/.
17 |
18 | """
19 |
20 | from typing import List, Tuple, Dict
21 |
22 | import tokenizer
23 |
24 | from tokenizer import Tok
25 | from reynir.binparser import BIN_Token
26 | from reynir import bintokenizer
27 |
28 |
29 | def prep_text_for_tokenizer(text: str) -> str:
30 | return "[[" + "]][[".join(text.split("\n")) + "]]"
31 |
32 |
33 | def index_text(text: str) -> Tuple[Dict[int, List[int]], Dict[int, str]]:
34 | """Segments contiguous (Icelandic) text into paragraphs and sentences
35 | and returns:
36 | dictionary of sentence indices to sentences
37 | dictionary of paragraph index to constituent sentence indices"""
38 | text = prep_text_for_tokenizer(text)
39 | tok_stream = bintokenizer.tokenize(text)
40 |
41 | pgs = tokenizer.paragraphs(tok_stream)
42 | pg_idx_to_sent_idx: Dict[int, List[int]] = dict()
43 | sent_idx_to_sent: Dict[int, str] = dict()
44 | curr_sent_idx = 0
45 | curr_pg_idx = 0
46 |
47 | for pg in pgs:
48 | sent_idxs: List[int] = []
49 | for _, sent in pg:
50 | curr_sent: List[Tok] = list(filter(BIN_Token.is_understood, sent))
51 | curr_sent_text = tokenizer.normalized_text_from_tokens(curr_sent)
52 | sent_idxs.append(curr_sent_idx)
53 | sent_idx_to_sent[curr_sent_idx] = curr_sent_text
54 | curr_sent_idx += 1
55 | pg_idx_to_sent_idx[curr_pg_idx] = sent_idxs
56 | curr_pg_idx += 1
57 | return pg_idx_to_sent_idx, sent_idx_to_sent
58 |
59 |
60 | def split_text(text: str) -> List[List[str]]:
61 | """Segments contiguous (Icelandic) text into paragraphs and sentences
62 | and returns a list of lists
63 | """
64 | text = prep_text_for_tokenizer(text)
65 | tok_stream = bintokenizer.tokenize(text)
66 | pgs = tokenizer.paragraphs(tok_stream)
67 | data: List[List[str]] = []
68 | for pg in pgs:
69 | pg_data: List[str] = []
70 | for _, sentence in pg:
71 | sentence = list(filter(BIN_Token.is_understood, sentence))
72 | sentence_text = tokenizer.normalized_text_from_tokens(sentence)
73 | pg_data.append(sentence_text)
74 | data.append(pg_data)
75 | return data
76 |
--------------------------------------------------------------------------------
/processors/README.md:
--------------------------------------------------------------------------------
1 | # Greynir Article Processors
2 |
3 | This directory contains Greynir's article processor modules, i.e. modules that in one way
4 | or another extract data from scraped articles. The current set of modules identifies and
5 | gathers information about named entities, persons and locations, and stores it in the database.
6 |
7 | Greynir currently supports two types of processor modules: grammar processors, which
8 | operate on sentence trees, and token processors, which operate on token streams.
9 |
--------------------------------------------------------------------------------
/processors/__init__.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | """
3 | Greynir: Natural language processing for Icelandic
4 |
5 | Processors folder
6 |
7 | This is the location to put custom processors for
8 | parsed trees and tokens.
9 |
10 | """
11 |
--------------------------------------------------------------------------------
/queries/README.md:
--------------------------------------------------------------------------------
1 | # Greynir Query Modules
2 |
3 | This directory contains Greynir's query modules, i.e. modules that handle Icelandic natural
4 | language questions and commands. The current set of modules handles a wide range of queries
5 | including many related to time, date, arithmetic, geography, locations, weather, etc.
6 |
7 | Greynir currently supports two kinds of query modules: plain text modules that receive a
8 | (mostly) unpreprocessed text string, and grammar modules, which provide their own context-free
9 | grammar for the Greynir parser and operate on grammar non-terminals. Examples of both module
10 | types can be found in the [`examples`](examples/) subdirectory:
11 |
12 | * [`examples/plaintext.py`](examples/plaintext.py)
13 | * [`examples/grammar.py`](examples/grammar.py)
14 |
--------------------------------------------------------------------------------
/queries/disabled/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/queries/disabled/.gitkeep
--------------------------------------------------------------------------------
/queries/examples/english.py:
--------------------------------------------------------------------------------
1 | """
2 |
3 | Greynir: Natural language processing for Icelandic
4 |
5 | Copyright (C) 2023 Miðeind ehf.
6 |
7 | This program is free software: you can redistribute it and/or modify
8 | it under the terms of the GNU General Public License as published by
9 | the Free Software Foundation, either version 3 of the License, or
10 | (at your option) any later version.
11 | This program is distributed in the hope that it will be useful,
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | GNU General Public License for more details.
15 |
16 | You should have received a copy of the GNU General Public License
17 | along with this program. If not, see http://www.gnu.org/licenses/.
18 |
19 |
20 | Example query module that responds in English.
21 |
22 | """
23 |
24 | from queries import Query
25 | from queries.util import gen_answer
26 |
27 |
28 | def handle_plain_text(q: Query) -> bool:
29 | ql = q.query_lower.rstrip("?")
30 |
31 | if ql == "segðu eitthvað á ensku":
32 | q.set_qtype("English")
33 |
34 | # Set answer
35 | answer = "This is an example of me speaking English"
36 | q.set_answer(*gen_answer(answer))
37 | q.set_voice_locale("en_GB")
38 |
39 | return True
40 |
41 | return False
42 |
--------------------------------------------------------------------------------
/queries/examples/plaintext.py:
--------------------------------------------------------------------------------
1 | """
2 |
3 | Greynir: Natural language processing for Icelandic
4 |
5 | Example of a plain text query processor module.
6 |
7 | Copyright (C) 2023 Miðeind ehf.
8 |
9 | This program is free software: you can redistribute it and/or modify
10 | it under the terms of the GNU General Public License as published by
11 | the Free Software Foundation, either version 3 of the License, or
12 | (at your option) any later version.
13 | This program is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | GNU General Public License for more details.
17 |
18 | You should have received a copy of the GNU General Public License
19 | along with this program. If not, see http://www.gnu.org/licenses/.
20 |
21 |
22 | This module is an example of a plug-in query response module
23 | for the Greynir query subsystem. It handles plain text queries, i.e.
24 | ones that do not require parsing the query text gramatically. For
25 | this purpose it only needs to implement the handle_plain_text()
26 | function, as shown below.
27 |
28 |
29 | """
30 |
31 | from datetime import datetime, timedelta, timezone
32 |
33 | from queries import Query
34 |
35 |
36 | def handle_plain_text(q: Query) -> bool:
37 | """Handle a plain text query, contained in the q parameter
38 | which is an instance of the query.Query class.
39 | Returns True if the query was handled, and in that case
40 | the appropriate properties on the Query instance have
41 | been set, such as the answer and the query type (qtype).
42 | If the query is not recognized, returns False."""
43 | ql = q.query_lower.rstrip("?")
44 |
45 | if ql == "er þetta prufa":
46 | q.set_qtype("PlaintextExample")
47 |
48 | # Set answer
49 | answer = "Já"
50 | voice = "Já, þetta er prufa"
51 | response = dict(answer=answer)
52 | q.set_answer(response, answer, voice)
53 |
54 | # Caching (optional)
55 | q.set_expires(datetime.now(timezone.utc) + timedelta(hours=24))
56 |
57 | # Context (optional)
58 | # q.set_context(dict(subject="Prufuviðfangsefni"))
59 |
60 | # Source (optional)
61 | # q.set_source("Prufumódúll")
62 |
63 | # Beautify query for end user display (optional)
64 | # q.set_beautified_query(ql.upper())
65 |
66 | # Javascript command to execute client-side (optional)
67 | # q.set_command("2 + 2")
68 |
69 | # URL to be opened by client (optional)
70 | # q.set_url("https://miðeind.is")
71 |
72 | return True
73 |
74 | return False
75 |
--------------------------------------------------------------------------------
/queries/grammars/README.md:
--------------------------------------------------------------------------------
1 | # Grammar files for query modules
2 |
3 | This directory stores various `.grammar` files containing the
4 | context-free grammar used by Greynir's query modules.
5 |
6 | To get syntax highlighting in your editor of choice, see the
7 | [VSCodeGrammar](https://github.com/mideind/VSCodeGrammar) repository.
8 |
--------------------------------------------------------------------------------
/queries/grammars/counting.grammar:
--------------------------------------------------------------------------------
1 | # Grammar for the counting query module
2 |
3 | Query →
4 | QCounting
5 |
6 | QCounting → QCountingQuery '?'?
7 |
8 | QCountingQuery →
9 | QCountingUp | QCountingDown | QCountingBetween
10 |
11 | QCountingUp →
12 | "teldu" QCountingSpeed? QCountingUpTo QCountingFirstNumber QCountingSpeed?
13 | | QCountingCanYouCount QCountingSpeed? QCountingUpTo QCountingFirstNumber QCountingSpeed?
14 |
15 | QCountingDown →
16 | "teldu" QCountingSpeed? "niður" "frá" QCountingFirstNumber QCountingSpeed?
17 | | QCountingCanYouCount QCountingSpeed? "niður" "frá" QCountingFirstNumber QCountingSpeed?
18 |
19 | QCountingBetween →
20 | "teldu" QCountingSpeed? "frá" QCountingFirstNumber QCountingUpTo QCountingSecondNumber QCountingSpeed?
21 | | QCountingCanYouCount QCountingSpeed? "frá" QCountingFirstNumber QCountingUpTo QCountingSecondNumber QCountingSpeed?
22 |
23 | QCountingFirstNumber →
24 | to | töl | tala
25 |
26 | QCountingSecondNumber →
27 | to | töl | tala
28 |
29 | QCountingSpeed →
30 | "mjög" "hægt" | "hægt" | "hratt" | "mjög" "hratt"
31 |
32 | QCountingUpTo →
33 | "upp"? "að" | "upp"? "í" | "upp"? "til"
34 |
35 | QCountingCanYouCount →
36 | "geturðu" "talið" | "getur" "þú" "talið" | "nennirðu" "að" "telja" | "nennir" "þú" "að" "telja"
37 |
38 | $score(+35) QCounting
39 |
--------------------------------------------------------------------------------
/queries/grammars/dictionary.grammar:
--------------------------------------------------------------------------------
1 | # Grammar for the dictionary query module
2 |
3 | Query →
4 | QDictQuery '?'?
5 |
6 | QDictQuery →
7 | QDictWordQuery
8 |
9 | QDictWordQuery →
10 | "hvað" "segir" QDictDict "um" "orðið" QDictSubjectNom
11 | | "hvað" "stendur" QDictInDictionary "um" "orðið" QDictSubjectNom
12 | | QDictWhatWhich "er" QDictDefinition "á" "orðinu" QDictSubjectNom QDictInDictionary?
13 | | "flettu" "upp" "orðinu" QDictSubjectNom QDictInDictionary?
14 | | "flettu" "orðinu" QDictSubjectNom "upp" QDictInDictionary?
15 | | "fletta" "upp" "orðinu" QDictSubjectNom QDictInDictionary?
16 | | "fletta" "orðinu" QDictSubjectNom "upp" QDictInDictionary?
17 | | QDictCanYou "flett" "upp" "orðinu" QDictSubjectNom QDictInDictionary?
18 | | "hvernig" "skilgreinir" QDictDict "orðið" QDictSubjectNom
19 | | "hvernig" "er" "orðið" QDictSubjectNom "skilgreint" QDictInDictionary?
20 | | QDictDefinition "á" "orðinu" QDictSubjectNom
21 | | "skilgreindu" "orðið" QDictSubjectNom
22 | | "komdu" "með" "skilgreininguna" "á" "orðinu" QDictSubjectNom
23 | | "komdu" "með" "skilgreiningu" "á" "orðinu" QDictSubjectNom
24 | | "komdu" "með" "orðabókarskilgreiningu" "á" QDictSubjectNom
25 | | "komdu" "með" "orðabókarskilgreininguna" "á" QDictSubjectNom
26 | | QDictKnowHowTo "að" "skilgreina" "orðið" QDictSubjectNom
27 | | QDictCanYou "skilgreint" "orðið" QDictSubjectNom
28 |
29 | QDictInDictionary →
30 | "í" "orðabók" | "í" "orðabókinni"
31 | | "í" "íslenskri" "orðabók" | "í" "íslensku" "orðabókinni"
32 |
33 | QDictDict →
34 | "orðabók" | "orðabókin" | "íslensk" "orðabók" | "íslenska" "orðabókin"
35 |
36 | QDictWhatWhich →
37 | "hvað" | "hver"
38 |
39 | QDictCanYou →
40 | "getur" "þú" | "geturðu"
41 |
42 | QDictKnowHowTo →
43 | "kannt" "þú" | "kanntu"
44 |
45 | QDictDefinition →
46 | "skilgreining" | "skilgreiningin"
47 | | "orðabókarskilgreining" | "orðabókarskilgreiningin"
48 | | "orðabókaskilgreining" | "orðabókaskilgreiningin"
49 | | "skilgreining" "íslenskrar"? "orðabókar" | "skilgreining" "íslensku"? "orðabókarinnar"
50 | | "skilgreining" "í" "íslenskri"? "orðabók" | "skilgreiningin" "í" "íslenskri"? "orðabók"
51 |
52 | QDictSubjectNom →
53 | Nl
54 |
55 | $score(+35) QDictQuery
56 |
57 |
--------------------------------------------------------------------------------
/queries/grammars/flights.grammar:
--------------------------------------------------------------------------------
1 | # Grammar for the flights query module
2 |
3 | Query →
4 | QFlights
5 |
6 | QFlights → QFlightsQuery '?'?
7 |
8 | QFlightsQuery →
9 | QFlightsArrivalQuery
10 | | QFlightsDepartureQuery
11 |
12 | QFlightsArrivalQuery →
13 | # Arrivals at Icelandic airports, e.g.
14 | # Hver er lendingartími næstu vélar í Reykjavík
15 | # Hvenær kemur næsta flug til Keflavíkur frá Kaupmannahöfn
16 | QFlightsWhenArr QFlightsNextPlane QFlightsPathDesc
17 |
18 | QFlightsWhenArr →
19 | QFlightsWhen "lendir"
20 | | QFlightsWhen "kemur"
21 | | QFlightsWhen "mætir"
22 | | "hver" "er" "lendingartími"
23 | | "hver" "er" "lendingartíminn" "fyrir"
24 |
25 | QFlightsDepartureQuery →
26 | # Departures from Icelandic airports, e.g.
27 | # Hver er brottfarartími næstu vélar til London
28 | # Hvenær flýgur næsta vél af stað frá Keflavík til Köben
29 | QFlightsWhenDepNextPlane QFlightsPathDesc
30 |
31 | QFlightsAfStað → "af" "stað"
32 |
33 | QFlightsWhenDepNextPlane →
34 | QFlightsWhen "leggur" QFlightsNextPlane QFlightsAfStað
35 | | QFlightsWhenDep QFlightsNextPlane QFlightsAfStað?
36 |
37 | QFlightsNextPlane →
38 | "næsta" QFlightsPlane/fall
39 | | "næstu" QFlightsPlane/fall
40 |
41 | QFlightsWhenDep →
42 | QFlightsWhen "fer"
43 | | QFlightsWhen "er"
44 | | QFlightsWhen "flýgur"
45 | | "hver" "er" "brottfarartími"
46 | | "hver" "er" "brottfarartíminn" "fyrir"
47 |
48 | QFlightsWhen →
49 | "hvenær" | "klukkan" "hvað"
50 |
51 | QFlightsPlane/fall ->
52 | 'flug:hk'_et/fall
53 | | 'flugvél:kvk'_et/fall
54 | | 'vél:kvk'_et/fall
55 |
56 | QFlightsPathDesc →
57 | # At least one endpoint of the flight (in any order), e.g.
58 | # frá Keflavík til Reykjavíkur
59 | # til Akureyrar
60 | QFlightsPrepLoc QFlightsPrepLoc
61 | > QFlightsPrepLoc
62 |
63 | QFlightsPrepLoc →
64 | "til" QFlightsArrLoc_ef
65 | | "frá" QFlightsDepLoc_þgf
66 | | "í" QFlightsArrLoc_þgf
67 | | "á" QFlightsArrLoc_þgf
68 | | "á" QFlightsArrLoc_þf
69 |
70 | QFlightsArrLoc/fall →
71 | Nl/fall
72 |
73 | QFlightsDepLoc/fall →
74 | Nl/fall
75 |
76 | $tag(keep) QFlightsArrLoc/fall
77 | $tag(keep) QFlightsDepLoc/fall
78 |
--------------------------------------------------------------------------------
/queries/grammars/geography.grammar:
--------------------------------------------------------------------------------
1 | # Grammar for the geography query module
2 |
3 | Query →
4 | QGeo
5 |
6 | QGeo → QGeoQuery '?'?
7 |
8 | QGeoQuery →
9 | QGeoCapitalQuery
10 | | QGeoCountryQuery
11 | | QGeoContinentQuery
12 | | QGeoLocationDescQuery
13 |
14 | QGeoCapitalQuery →
15 | # "hvað/hver er höfuðborgin í/á Spáni?"
16 | QGeoWhatIs "höfuðborgin" QGeoPreposition QGeoSubject_þgf
17 | # "hvað/hver er höfuðborg Spánar?"
18 | | QGeoWhatIs "höfuðborg" QGeoSubject_ef
19 | # "hvað/hver er höfuðstaður Spánar?"
20 | | QGeoWhatIs "höfuðstaður" QGeoSubject_ef
21 |
22 | QGeoCountryQuery →
23 | "í" "hvaða" "landi" "er" QGeoCityOrTown? QGeoSubject_nf
24 | | "í" "hvaða" "ríki" "er" QGeoCityOrTown? QGeoSubject_nf
25 |
26 | QGeoContinentQuery →
27 | "í" "hvaða" "heimsálfu" "er" QGeoCountryOrCity? QGeoSubject_nf
28 | | "hvar" "í" "heiminum" "er" QGeoCountryOrCity? QGeoSubject_nf
29 |
30 | QGeoLocationDescQuery →
31 | # Hvar er borgin Tókýó / Hvar er landið Kambódía?
32 | QGeoWhereIs QGeoCountryOrCity? QGeoSubject_nf
33 |
34 | QGeoCountryOrCity →
35 | "landið" | "ríkið" | QGeoCityOrTown
36 |
37 | $score(+100) QGeoCountryOrCity
38 |
39 | QGeoCityOrTown →
40 | "borgin" | "bærinn" | "kaupstaðurinn"
41 |
42 | $score(+100) QGeoCityOrTown
43 |
44 | QGeoWhatIs →
45 | "hver" "er" | "hvað" "er" | "hvað" "heitir" | 0
46 |
47 | QGeoWhereIs →
48 | "hvar" "er"
49 | | "hvar" "eru"
50 | | "hvar" "í" "heiminum" "er"
51 | | "hvar" "í" "heiminum" "eru"
52 | | "hvar" "á" "jörðinni" "er"
53 | | "hvar" "á" "jörðinni" "eru"
54 | | "hvar" "á" "plánetunni" "er"
55 | | "hvar" "á" "plánetunni" "eru"
56 | | "hvar" "á" "hnettinum" "er"
57 | | "hvar" "á" "hnettinum" "eru"
58 |
59 | QGeoPreposition →
60 | "í" | "á"
61 |
62 | QGeoSubject/fall →
63 | Nl/fall
64 |
65 | QGeoSubject_nf →
66 | # Hardcoded special case, otherwise identified as adj. "kostaríkur" :)
67 | "kostaríka"
68 | # The grammar seems to have a hard time with these
69 | | "norður" "kórea"
70 | | "nýja" "sjáland"
71 | | "norður" "makedónía"
72 | | "hvíta" "rússland" | "hvíta-rússland"
73 | | "sameinuðu" "arabísku" "furstadæmin"
74 | | "seychelles" "eyjar"
75 |
76 | QGeoSubject_þgf →
77 | # Hardcoded special case, otherwise identified as adj. "kostaríkur" :)
78 | "kostaríku"
79 | | "norður" "kóreu"
80 | | "nýja" "sjálandi"
81 | | "norður" "makedóníu"
82 | | "hvíta" "rússlandi" | "hvíta-rússlandi"
83 | | "sameinuðu" "arabísku" "furstadæmunum"
84 | | "seychelles" "eyjum"
85 |
86 | QGeoSubject_ef →
87 | # Hardcoded special case, otherwise identified as adj. "kostaríkur" :)
88 | "kostaríku"
89 | | "norður" "kóreu"
90 | | "nýja" "sjálands"
91 | | "norður" "makedóníu"
92 | | "hvíta" "rússlands" | "hvíta-rússlands"
93 | | "sameinuðu" "arabísku" "furstadæmanna"
94 | | "seychelles" "eyja"
95 |
96 | $score(+10) QGeoSubject/fall
97 | $score(-100) QGeoLocationDescQuery
98 |
99 | $score(+35) QGeo
100 |
--------------------------------------------------------------------------------
/queries/grammars/ja.grammar:
--------------------------------------------------------------------------------
1 | # Grammar for the ja query module
2 |
3 | Query →
4 | QJaQuery '?'?
5 |
6 | QJaQuery →
7 | QJaPhoneNumQuery
8 |
9 | QJaPhoneNumQuery →
10 | QJaName4PhoneNumQuery | QJaPhoneNum4NameQuery
11 |
12 | QJaPhoneNum4NameQuery →
13 | # "Hver er síminn hjá Jóni Jónssyni?"
14 | QJaWhatWhich "er" QJaTheNumber_nf "hjá" QJaSubject
15 | # "Hvaða síma er Jón Jónsson með?"
16 | | "hvaða" QJaTheNumber_þf "er" QJaSubject "með"
17 | # Flettu upp númerinu hjá Jóni Jónssyni?
18 | | "flettu" "upp" QJaTheNumber_þgf "hjá" QJaSubject
19 | # Hver er sími Jóns Jónssonar?
20 | # | QJaWhatWhich "er" QJaTheNumber_nf QJaSubject
21 |
22 | QJaName4PhoneNumQuery →
23 | "hver" "er" "með" QJaTheNumber_þf QJaPhoneNum QJaInPhonebook?
24 | | "hverjir" "eru" "með" QJaTheNumber_þf QJaPhoneNum QJaInPhonebook?
25 | | "flettu" "upp" QJaTheNumber_þgf QJaPhoneNum QJaInPhonebook?
26 | | "flettu" "upp" QJaPhoneNum QJaInPhonebook
27 | | "hver" "er" "í" "síma" QJaPhoneNum
28 |
29 | QJaThemÞgf →
30 | "hann" | "hana" | "þau" | "þá" | "þær" | "það" "númer"? | "þetta" "númer"?
31 |
32 | QJaInPhonebook →
33 | "í" "símaskránni" | "á" "já" "punktur" "is"
34 |
35 | QJaPhoneNum →
36 | Nl
37 |
38 | QJaSubject →
39 | Nl
40 |
41 | QJaTheNumber/fall →
42 | 'númer:hk'/fall
43 | | 'símanúmer:hk'/fall
44 | | 'sími:kk'/fall
45 |
46 | QJaWhatWhich →
47 | "hvert" | "hvað" | "hver"
48 |
49 | $score(+35) QJaQuery
50 |
51 | $tag(keep) QJaPhoneNum
52 | $tag(keep) QJaSubject
53 |
--------------------------------------------------------------------------------
/queries/grammars/news.grammar:
--------------------------------------------------------------------------------
1 | # Grammar for the news query module
2 |
3 | Query →
4 | QNewsQuery '?'?
5 |
6 | QNewsQuery →
7 | QNewsLatest
8 |
9 | QNewsLatest →
10 | QNewsTellMe? QNewsQualifiersDef? "fréttir"
11 | | QNewsTellMe? "hvað" "er" QNewsQualifiers? "í" "fréttum" QNewsRUV? QNewsNow?
12 | | QNewsTellMe? "hvað" "er" QNewsQualifiers? "í" "fréttunum" QNewsRUV? QNewsNow?
13 | | QNewsTellMe? "hvað" "er" QNewsQualifiers? "að" "frétta" QNewsRUV? QNewsNow?
14 | | QNewsTellMe? "hvað" "er" "að" "gerast" QNewsNow?
15 | | QNewsTellMe? "hvaða" "fréttir" "eru" QNewsQualifiers? QNewsRUV QNewsNow?
16 | | QNewsTellMe? "hverjar" "eru" QNewsQualifiersDef? "fréttir" QNewsRUV? QNewsNow?
17 | | QNewsTellMe? "hverjar" "eru" QNewsQualifiersDef? "fréttirnar" QNewsRUV? QNewsNow?
18 | | QNewsCanYou "lesið" "fyrir" "mig" QNewsQualifiersDef? "fréttir" QNewsRUV?
19 | | QNewsCanYou "lesið" QNewsQualifiersDef? QNewsRUV? "fréttir" "fyrir" "mig"
20 |
21 | QNewsTellMe →
22 | "segðu" "mér"? | "geturðu" "sagt" "mér"?
23 |
24 | QNewsCanYou →
25 | "geturðu" | "getur" "þú"
26 |
27 | QNewsNow →
28 | "núna" | "þessa_stundina" | "í" "dag" # | 'í_dag'
29 |
30 | QNewsQualifiers →
31 | "helst" | "eiginlega" | "núna" | "nýjast"
32 |
33 | QNewsQualifiersDef →
34 | "helstu" | "nýjustu" | "síðustu" | "allranýjustu" | "seinustu"
35 |
36 | QNewsRUV →
37 | "á"? "rúv"
38 | | "í" "rúv"
39 | | "hjá" "rúv"
40 | | "í" "ríkisútvarpinu"
41 | | "á" "ríkisútvarpinu"
42 | | "hjá" "ríkisútvarpinu"
43 | | "á" "vef" "rúv"
44 | | "á" "vef" "ríkisútvarpsins"
45 | | "ríkisútvarpsins"
46 |
47 | $score(+35) QNewsQuery
48 |
--------------------------------------------------------------------------------
/queries/grammars/opinion.grammar:
--------------------------------------------------------------------------------
1 | # Grammar for the opinion query module
2 |
3 | Query →
4 | QOpinion
5 |
6 | QOpinion →
7 | QOpinionQuery '?'?
8 |
9 | QOpinionQuery →
10 | "hvað" "finnst" "þér" "eiginlega"? "um" QOpinionSubject_þf
11 | | "hvað" "þykir" "þér" "eiginlega"? "um" QOpinionSubject_þf
12 | | "hvaða" "skoðun" QOpinionWhichDoYouHave "eiginlega"? "á" QOpinionSubject_þgf
13 | | "hver" "er" "skoðun" "þín" "á" QOpinionSubject_þgf
14 | | "hvaða" "skoðanir" QOpinionWhichDoYouHave? "eiginlega"? "á" QOpinionSubject_þgf
15 | | "hvert" "er" "álit" "þitt" "á" QOpinionSubject_þgf
16 | | "hvaða" "álit" QOpinionWhichDoYouHave? "eiginlega"? "á" QOpinionSubject_þgf
17 | | QOpinionAreYou QOpinionEmotions QOpinionDueTo QOpinionSubject_þgf
18 |
19 | QOpinionSubject/fall →
20 | Nl/fall
21 |
22 | QOpinionAreYou →
23 | "ertu" | "ert" "þú"
24 |
25 | QOpinionWhichDoYouHave →
26 | "hefurðu" | "hefur" "þú" | "ertu" "með" | "ertu" "þú" "með"
27 |
28 | QOpinionEmotions →
29 | "reið" | "bitur" | "í" "uppnámi" | "brjáluð" | "vonsvikin"
30 |
31 | QOpinionDueTo →
32 | "út" "af" | "yfir"
33 |
34 | $tag(keep) QOpinionSubject/fall
35 |
--------------------------------------------------------------------------------
/queries/grammars/pic.grammar:
--------------------------------------------------------------------------------
1 | # Grammar for the pic query module
2 |
3 | Query →
4 | QPic
5 |
6 | QPic →
7 | QPicQuery '?'?
8 |
9 | QPicQuery →
10 | QPicShowMePictureQuery | QPicWrongPictureQuery
11 |
12 | QPicShowMe →
13 | "sýndu" | "getur" "þú" "sýnt" | "geturðu" "sýnt" | "viltu" "sýna" |
14 | "nennirðu" "að" "sýna" | "nennir" "þú" "að" "sýna"
15 |
16 | QPicShowMePictureQuery →
17 | QPicShowMe QPicMeOrUs? QPicPictureOrPhoto "af" QPicSubject
18 |
19 | QPicPictureOrPhoto →
20 | "ljósmynd" | "mynd" | "ljósmyndir" | "myndir"
21 |
22 | QPicMeOrUs →
23 | "mér" | "okkur"
24 |
25 | QPicSubject →
26 | Nl_þgf
27 |
28 | QPicWrongPictureQuery →
29 | "þetta" QPicIsWas QPicWrong QPicPictureOrPhoto
30 |
31 | QPicWrong →
32 | "röng" | "vitlaus" | "ekki" "rétt"
33 |
34 | QPicIsWas →
35 | "er" | "var"
36 |
--------------------------------------------------------------------------------
/queries/grammars/rand.grammar:
--------------------------------------------------------------------------------
1 | # Grammar for the rand query module
2 |
3 | Query →
4 | QRandom
5 |
6 | QRandom → QRandomQuery '?'?
7 |
8 | QRandomQuery →
9 | QRandomDieRoll | QRandomBetween | QRandomHeadsOrTails # | QRandomMultipleDiceRoll
10 |
11 | QRandomHeadsOrTails →
12 | "fiskur" "eða" "skjaldarmerki" | "skjaldarmerki" "eða" "fiskur"
13 | | "kastaðu" "upp"? "peningi" | "kastaðu" "upp"? "pening" | "kastaðu" "upp"? "krónu"
14 |
15 | QRandomDieRoll →
16 | "kastaðu" QRandomDiceSides? QRandomDie QRandomForMe?
17 | | "kastaðu" QRandomForMe? QRandomDiceSides? QRandomDie
18 | | "kasta" QRandomDiceSides? QRandomDie QRandomForMe?
19 | | "nennirðu" "að" "kasta" QRandomDiceSides? QRandomDie QRandomForMe?
20 | | "geturðu" "kastað" QRandomDiceSides? QRandomDie QRandomForMe?
21 | | "geturðu" "kastað" QRandomForMe? QRandomDiceSides? QRandomDie
22 | | "kastaðu" "upp" "á" "teningnum" QRandomForMe?
23 | | "kastaðu" "upp" "á" "teningi" QRandomForMe?
24 |
25 | # QRandomMultipleDiceRoll →
26 | # "kastaðu" QRandNumber "teningum" QRandomForMe?
27 | # | "kastaðu" QRandomForMe? QRandNumber "teningum"
28 | # | "kasta" QRandNumber "teningum" QRandomForMe?
29 | # | "nennirðu" "að" "kasta" QRandNumber "teningum" QRandomForMe?
30 | # | "geturðu" "kastað" QRandNumber "teningum" QRandomForMe?
31 | # | "geturðu" "kastað" QRandomForMe? QRandNumber "teningum"
32 |
33 | QRandomForMe →
34 | "fyrir" "mig"
35 |
36 | QRandomDie →
37 | # Allow "tening" (accusative) to make it a bit more robust. Common error.
38 | "teningi" | "tening" | "teningnum" | "teningunum"
39 |
40 | QRandomDiceSides →
41 | QRandNumber "hliða"
42 |
43 | QRandomBetween →
44 | QRandAction "tölu" "á"? "milli" QRandNumber "og" QRandNumber QRandRand?
45 | | QRandAction "tölu" QRandRand? "á"? "milli" QRandNumber "og" QRandNumber
46 | | QRandAction QRandRand? "tölu" "á"? "milli" QRandNumber "og" QRandNumber
47 |
48 | QRandAction →
49 | "veldu" | "veldu" "fyrir" "mig" | "veldu" "handa" "mér" | "veldu" "fyrir" "okkur"
50 | | "geturðu" "valið" "fyrir" "mig" | "getur" "þú" "valið" "fyrir" "mig"
51 | | "gætir" "þú" "valið" "fyrir" "mig" | "værirðu" "til" "í" "að" "velja" "fyrir" "mig"
52 | | "nefndu" | "nefndu" "fyrir" "mig" | "nefndu" "fyrir" "okkur"
53 | | "komdu" "með"
54 | | "geturðu" "komið" "með" | "getur" "þú" "komið" "með"
55 | | "gætirðu" "komið" "með" | "gætir" "þú" "komið" "með"
56 | | "gefðu" "mér"
57 | | "geturðu" "gefið" "mér" | "getur" "þú" "gefið" "mér"
58 | | "gætirðu" "gefið" "mér" | "gætir" "þú" "gefið" "mér"
59 |
60 | QRandRand →
61 | # "Að handahófi" is incorrect but we'll allow it
62 | "af" "handahófi" | "að" "handahófi"
63 |
64 | QRandNumber →
65 | # to is a declinable number word ('tveir/tvo/tveim/tveggja')
66 | # töl is an undeclinable number word ('sautján')
67 | # tala is a number ('17')
68 | to | töl | tala | "núll"
69 |
70 | $score(+35) QRandom
71 |
--------------------------------------------------------------------------------
/queries/grammars/root.grammar:
--------------------------------------------------------------------------------
1 | # Root query grammar
2 |
3 | QueryRoot →
4 | Query
5 |
6 | # Mark the QueryRoot nonterminal as a root in the grammar
7 | $root(QueryRoot)
8 |
9 | # Keep all child families of Query, i.e. all possible query
10 | # trees, rather than just the highest-scoring one
11 | $tag(no_reduce) Query
12 |
--------------------------------------------------------------------------------
/queries/grammars/sunpos.grammar:
--------------------------------------------------------------------------------
1 | # Grammar for the sunpos query module
2 |
3 | Query →
4 | QSunQuery '?'?
5 |
6 | QSunQuery →
7 | # Hvenær er birting í Reykjavík á morgun
8 | # Klukkan hvað var myrkur á Norðfirði í gær
9 | QSunWhen QSunPositions QSunPlaceAndTime?
10 | | QSunSunheight QSunPlaceAndTime?
11 |
12 | QSunPlaceAndTime →
13 | QSunDate QSunLocation?
14 | > QSunLocation QSunDate
15 | > QSunLocation
16 |
17 | QSunWhen →
18 | "hvenær" | "klukkan" "hvað"
19 |
20 | QSunIsWillWas →
21 | 'vera' | 'verða'
22 |
23 |
24 | QSunSunheight →
25 | "hver" QSunIsWillWas QSunSólarhæð
26 |
27 | QSunSólarhæð →
28 | 'sólarhæð'
29 | | "hæð" 'sól'
30 | | "hæð" 'Sól'
31 | | 'Hæð' 'Sól'
32 |
33 | QSunPositions →
34 | QSunMiðnætti
35 | | QSunDögun
36 | | QSunBirting
37 | | QSunSólris
38 | | QSunHádegi
39 | | QSunSólarlag
40 | | QSunMyrkur
41 | | QSunDagsetur
42 |
43 | QSunMiðnætti →
44 | QSunIsWillWas "miðnætti"
45 |
46 | QSunDögun →
47 | QSunIsWillWas "dögun"
48 |
49 | QSunBirting →
50 | QSunIsWillWas "birting"
51 | | "mun" "birta"
52 |
53 | QSunSólris →
54 | 'rísa' "sólin"
55 | | "mun" "sólin" "rísa"
56 | | QSunIsWillWas "sólarupprás"
57 | | "kemur" "sólin" "upp"
58 | | "kom" "sólin" "upp"
59 | | "fór" "sólin" "upp"
60 | | "fer" "sólin" "upp"
61 |
62 | QSunHádegi →
63 | QSunIsWillWas "hádegi"
64 |
65 | QSunSólarlag →
66 | "sest" "sólin"
67 | | "settist" "sólin"
68 | | "mun" "sólin" "setjast"
69 | | "fer" "sólin" "niður"
70 | | "fór" "sólin" "niður"
71 | | QSunIsWillWas 'sólsetur'
72 | | QSunIsWillWas "sólarlag"
73 |
74 | QSunMyrkur →
75 | QSunIsWillWas "myrkur"
76 |
77 | QSunDagsetur →
78 | QSunIsWillWas "dagsetur"
79 |
80 |
81 | QSunDate →
82 | QSunToday
83 | | QSunYesterday
84 | | QSunTomorrow
85 |
86 | QSunToday →
87 | "í" "dag" | "í_kvöld" | "í_morgun" | "í" "nótt" | 'Í' 'Dag'
88 |
89 | QSunYesterday →
90 | "í_gær"
91 |
92 | QSunTomorrow →
93 | "á_morgun"
94 |
95 |
96 | QSunLocation →
97 | QSunCapitalRegion
98 | | QSunInArbitraryLocation
99 |
100 | QSunCapitalRegion →
101 | "á" "höfuðborgarsvæðinu" | "fyrir" "höfuðborgarsvæðið"
102 | | "í" "reykjavík" | "fyrir" "reykjavík"
103 | | "í" "höfuðborginni" | "fyrir" "höfuðborgina"
104 | | "á" "reykjavíkursvæðinu" | "fyrir" "reykjavíkursvæðið"
105 | | "í" "borginni" | "fyrir" "borgina"
106 |
107 | QSunInArbitraryLocation →
108 | fs_þgf QSunArbitraryLocation
109 |
110 | QSunArbitraryLocation →
111 | Nl_þgf
--------------------------------------------------------------------------------
/queries/grammars/userloc.grammar:
--------------------------------------------------------------------------------
1 | # Grammar for the userloc query module
2 |
3 | Query →
4 | QUserLocation
5 |
6 | QUserLocation → QUserLocationQuery '?'?
7 |
8 | QUserLocationQuery →
9 | QUserLocationCurrent | QUserLocationPostcode | QUserLocationCountry
10 |
11 | QUserLocationCurrent →
12 | "hvar" "er" "ég" QULocEiginlega? QULocLocated? QULocInTheWorld? QULocNow?
13 | | "hvar" QULocInTheWorld "er" "ég" QULocEiginlega? QULocLocated? QULocNow?
14 | | "hvað" "er" "ég" QULocEiginlega? QULocLocated? QULocInTheWorld? QULocNow?
15 | | "veistu" "hvar" "ég" "er" QULocEiginlega? QULocInTheWorld? QULocNow?
16 | | "veist" "þú" "hvar" "ég" "er" QULocEiginlega? QULocInTheWorld? QULocNow?
17 | | "hver" "er" "staðsetning" "mín"? QULocEiginlega? QULocInTheWorld? QULocNow?
18 | | "hver" "er" "staðsetningin" "mín"? QULocEiginlega? QULocInTheWorld? QULocNow?
19 | | "hvar" "erum" "við" QULocEiginlega? QULocLocatedFemAndPlural? QULocInTheWorld? QULocNow?
20 | | "staðsetning" "mín"? QULocInTheWorld? QULocNow?
21 | | QULocWhichStreet QULocEiginlega? QULocLocated? QULocInTheWorld? QULocNow?
22 |
23 | QUserLocationPostcode →
24 | "í" "hvaða" "póstnúmeri" "er" "ég" QULocEiginlega? QULocLocated? QULocNow?
25 | | "hvaða" "póstnúmeri" "er" "ég" QULocEiginlega? QULocLocated? "í" QULocNow?
26 | | "í" "hvaða" "póstnúmeri" "erum" "við" QULocEiginlega? QULocLocated? QULocNow?
27 | | "hvaða" "póstnúmeri" "erum" "við" QULocEiginlega? QULocLocated? "í" QULocNow?
28 |
29 | QUserLocationCountry →
30 | QULocPreposition "hvaða" "landi" "er" "ég" QULocLocated? QULocNow?
31 | | QULocPreposition "hvaða" "landi" "erum" "við" QULocLocated? QULocNow?
32 | | "hvaða" "landi" "er" "ég" QULocLocated? QULocPreposition QULocNow?
33 | | "hvaða" "landi" "erum" "við" QULocLocated? QULocPreposition QULocNow?
34 |
35 | QULocWhichStreet →
36 | QULocPreposition "hvaða" "götu" "er" "ég" QULocLocated? QULocNow?
37 | | QULocPreposition "hvaða" "götu" "erum" "við" QULocLocated? QULocNow?
38 |
39 | QULocPreposition →
40 | "á" | "í"
41 |
42 | QULocEiginlega →
43 | "eiginlega"
44 |
45 | QULocLocated →
46 | QULocLocatedMasc | QULocLocatedFemAndPlural
47 |
48 | QULocLocatedMasc →
49 | "staddur" | "staðsettur" | "niðurkominn" | "niður" "kominn"
50 |
51 | QULocLocatedFemAndPlural →
52 | "stödd" | "staðsett" | "niðurkomin" | "niður" "komin"
53 |
54 | QULocInTheWorld →
55 | "í" "heiminum"
56 | | "í" "veröldinni"
57 | | "á" "hnettinum"
58 | | "á" "jörðinni"
59 | | "á" "landinu"
60 | | "á" "Íslandi"
61 | | "á" "yfirborði" "jarðar"
62 | | "á" "jarðkringlunni"
63 | | "á" "plánetunni" "jörð"?
64 |
65 | QULocNow →
66 | "nákvæmlega"? QULocNowGeneric
67 |
68 | QULocNowGeneric →
69 | "nú" | "akkúrat"? "núna" | "eins" "og" "stendur" | "sem" "stendur"
70 | | "í" "augnablikinu" | "á" "þessari" "stundu" | "hér" "og" "nú"
71 |
72 | $score(+35) QUserLocation
73 |
--------------------------------------------------------------------------------
/queries/grammars/whatis.grammar:
--------------------------------------------------------------------------------
1 | # Grammar for the whatis query module
2 |
3 | Query →
4 | QWhatIsQuery
5 |
6 | QWhatIsQuery →
7 | # Það þarf að gera ráð fyrir sérstökum punkti í
8 | # enda fyrirspurnarinnar þar sem punktur á eftir 'hf.'
9 | # eða 'ehf.' í enda setningar er skilinn frá
10 | # skammstöfunar-tókanum.
11 | QWhatIsPrefix/fall/tala QWhatIsEntity/fall/tala "."? "?"?
12 |
13 | QWhatIsEntity/fall/tala → Nl/fall/tala
14 |
15 | $tag(keep) QWhatIsEntity/fall/tala
16 |
17 | QWhatIsPrefix_nf_et →
18 | "hvað" "er"
19 |
20 | QWhatIsPrefix_nf_ft →
21 | "hvað" "eru"
22 |
23 | QWhatIsPrefix_þf/tala →
24 | "hvað" "veistu" "um"
25 | | "hvað" "geturðu" "sagt" "mér"? "um"
26 |
27 | QWhatIsPrefix_þgf/tala →
28 | "segðu" "mér"? "frá"
29 |
30 | QWhatIsPrefix_ef/tala →
31 | ""
32 |
--------------------------------------------------------------------------------
/queries/grammars/wiki.grammar:
--------------------------------------------------------------------------------
1 | # Grammar for the wiki query module
2 |
3 | Query →
4 | QWiki
5 |
6 | QWiki →
7 | QWikiQuery '?'? | QWikiWhatIsQuery '?'?
8 |
9 | QWikiQuery →
10 | # These take the subject in the nominative case
11 | QWikiSubjectNf "í" QWikipedia
12 |
13 | # These take the subject in the accusative case
14 | | "hvað" "segir" QWikipedia "um" QWikiSubjectÞf
15 | | "hvað" "stendur" "í" QWikipedia "um" QWikiSubjectÞf
16 | | "hvað" "stendur" "á" QWikipedia "um" QWikiSubjectÞf
17 | | "hvað" "stendur" "um" QWikiSubjectÞf "í" QWikipedia
18 | | "hvað" "getur" "þú" "sagt" QWikiMeOrUsÞgf? "um" QWikiSubjectÞf
19 | | "hvað" "geturðu" "sagt" QWikiMeOrUsÞgf? "um" QWikiSubjectÞf
20 | | "hvað" "getur" QWikipedia "sagt" QWikiMeOrUsÞgf? "um" QWikiSubjectÞf
21 | | "hvaða" "upplýsingar" "ert" "þú" "með" "um" QWikiSubjectÞf
22 | | "hvaða" "upplýsingar" "ertu" "með" "um" QWikiSubjectÞf
23 | | "hvaða" "upplýsingar" "er" QWikipedia "með" "um" QWikiSubjectÞf
24 | | "hvaða" "upplýsingum" "býr" QWikipedia "yfir" "varðandi" QWikiSubjectÞf
25 | | "hvaða" "upplýsingum" "býrðu" "yfir" "varðandi" QWikiSubjectÞf
26 | | "hvað" "myndi" QWikipedia "segja" QWikiMeOrUsÞgf? "um" QWikiSubjectÞf
27 | | "fræddu" QWikiMeOrUsÞf "um" QWikiSubjectÞf
28 | | "geturðu" "frætt" QWikiMeOrUsÞf "um" QWikiSubjectÞf
29 | | "nennirðu" "að" "fræða" QWikiMeOrUsÞf "um" QWikiSubjectÞf
30 |
31 | # These take the subject in the dative case
32 | | "segðu" QWikiMeOrUsÞgf "frá" QWikiSubjectÞgf
33 | | "segðu" QWikiMeOrUsÞgf "eitthvað" "um" QWikiSubjectÞf
34 | | "flettu" "upp" QWikiSubjectÞgf "í" QWikipedia
35 | | "geturðu" "flett" "upp" QWikiSubjectÞgf "í" QWikipedia
36 | | "nennirðu" "að" "fletta" "upp" QWikiSubjectÞgf "í" QWikipedia
37 | | "gætirðu" "flett" "upp" QWikiSubjectÞgf "í" QWikipedia
38 |
39 | QWikiWhatIsQuery →
40 | "hvað" "er" QWikiSubjectNlNf |
41 | "hvað" "eru" QWikiSubjectNlNf
42 |
43 | QWikiMeOrUsÞgf →
44 | "mér" | "okkur"
45 |
46 | QWikiMeOrUsÞf →
47 | "mig" | "okkur"
48 |
49 | QWikiSubjectNf →
50 | QWikiPrevSubjectNf | QWikiSubjectNlNf
51 |
52 | QWikiSubjectNlNf →
53 | Nl_nf
54 |
55 | QWikiSubjectÞf →
56 | QWikiPrevSubjectÞf | QWikiSubjectNlÞf
57 |
58 | QWikiSubjectNlÞf →
59 | Nl_þf
60 |
61 | QWikiSubjectÞgf →
62 | QWikiPrevSubjectÞgf | QWikiSubjectNlÞgf
63 |
64 | QWikiSubjectNlÞgf →
65 | Nl_þgf
66 |
67 | QWikiPrevSubjectNf →
68 | "hann" | "hún" | "það"
69 |
70 | QWikiPrevSubjectÞf →
71 | "hann" | "hana" | "það"
72 |
73 | QWikiPrevSubjectÞgf →
74 | "honum" | "henni" | "því"
75 |
76 | QWikipedia →
77 | {wikipedia_variations}
78 |
79 | $score(+35) QWikiPrevSubjectNf
80 | $score(+35) QWikiPrevSubjectÞf
81 | $score(+35) QWikiPrevSubjectÞf
82 |
83 | $score(+35) QWikiQuery
84 |
--------------------------------------------------------------------------------
/queries/js/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/queries/js/.gitkeep
--------------------------------------------------------------------------------
/queries/opinion.py:
--------------------------------------------------------------------------------
1 | """
2 |
3 | Greynir: Natural language processing for Icelandic
4 |
5 | Opinion query response module
6 |
7 | Copyright (C) 2023 Miðeind ehf.
8 |
9 | This program is free software: you can redistribute it and/or modify
10 | it under the terms of the GNU General Public License as published by
11 | the Free Software Foundation, either version 3 of the License, or
12 | (at your option) any later version.
13 | This program is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | GNU General Public License for more details.
17 |
18 | You should have received a copy of the GNU General Public License
19 | along with this program. If not, see http://www.gnu.org/licenses/.
20 |
21 |
22 | This module handles queries related to Embla's opinions.
23 |
24 | """
25 |
26 |
27 | from datetime import datetime, timedelta, timezone
28 |
29 | from queries import Query, QueryStateDict
30 | from queries.util import gen_answer, read_grammar_file
31 | from tree import Result, Node
32 |
33 |
34 | _OPINION_QTYPE = "Opinion"
35 |
36 |
37 | # Indicate that this module wants to handle parse trees for queries,
38 | # as opposed to simple literal text strings
39 | HANDLE_TREE = True
40 |
41 | # The grammar nonterminals this module wants to handle
42 | QUERY_NONTERMINALS = {"QOpinion"}
43 |
44 | # The context-free grammar for the queries recognized by this plug-in module
45 | GRAMMAR = read_grammar_file("opinion")
46 |
47 |
48 | def QOpinionQuery(node: Node, params: QueryStateDict, result: Result) -> None:
49 | result["qtype"] = _OPINION_QTYPE
50 |
51 |
52 | def QOpinionSubject(node: Node, params: QueryStateDict, result: Result) -> None:
53 | result["subject_nom"] = result._nominative
54 |
55 |
56 | def sentence(state: QueryStateDict, result: Result) -> None:
57 | """Called when sentence processing is complete"""
58 | q: Query = state["query"]
59 |
60 | if "qtype" not in result or "subject_nom" not in result:
61 | q.set_error("E_QUERY_NOT_UNDERSTOOD")
62 | return
63 |
64 | # OK, we've successfully matched a query type
65 | subj: str = result["subject_nom"]
66 | answer = "Ég hef enga sérstaka skoðun í þeim efnum."
67 | q.set_answer(*gen_answer(answer))
68 | q.set_qtype(_OPINION_QTYPE)
69 | q.set_context(dict(subject=subj))
70 | q.set_key(subj)
71 | q.set_expires(datetime.now(timezone.utc) + timedelta(hours=24))
72 |
--------------------------------------------------------------------------------
/queries/resources/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/queries/resources/.gitkeep
--------------------------------------------------------------------------------
/queries/test.py:
--------------------------------------------------------------------------------
1 | """
2 |
3 | Greynir: Natural language processing for Icelandic
4 |
5 | Test query response module
6 |
7 | Copyright (C) 2021 Miðeind ehf.
8 |
9 | This program is free software: you can redistribute it and/or modify
10 | it under the terms of the GNU General Public License as published by
11 | the Free Software Foundation, either version 3 of the License, or
12 | (at your option) any later version.
13 | This program is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | GNU General Public License for more details.
17 |
18 | You should have received a copy of the GNU General Public License
19 | along with this program. If not, see http://www.gnu.org/licenses/.
20 |
21 |
22 | This module handles queries related to testing various response
23 | payload functionality both server and client-side, for example
24 | JS code to be executed, URL to be opened, image to display, etc.
25 |
26 | """
27 |
28 | from queries import Query
29 | from queries.util import gen_answer
30 |
31 |
32 | _TEST_QTYPE = "Test"
33 |
34 |
35 | def handle_plain_text(q: Query) -> bool:
36 | """Handle a plain text query."""
37 | ql = q.query_lower.rstrip("?")
38 |
39 | if ql == "keyrðu kóða":
40 | q.set_command("2 + 2")
41 | elif ql == "opnaðu vefsíðu":
42 | q.set_url("https://mideind.is")
43 | elif ql == "sýndu mynd":
44 | q.set_image("https://greynir.is/static/img/GreynirLogoHoriz180x80.png")
45 | else:
46 | return False
47 |
48 | q.set_qtype(_TEST_QTYPE)
49 | q.set_answer(*gen_answer("Skal gert"))
50 |
51 | return True
52 |
--------------------------------------------------------------------------------
/queries/whatis.py:
--------------------------------------------------------------------------------
1 | """
2 |
3 | Greynir: Natural language processing for Icelandic
4 |
5 | 'What is?' query module
6 |
7 | Copyright (C) 2023 Miðeind ehf.
8 | Original author: Vilhjálmur Þorsteinsson
9 |
10 | This program is free software: you can redistribute it and/or modify
11 | it under the terms of the GNU General Public License as published by
12 | the Free Software Foundation, either version 3 of the License, or
13 | (at your option) any later version.
14 | This program is distributed in the hope that it will be useful,
15 | but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | GNU General Public License for more details.
18 |
19 | You should have received a copy of the GNU General Public License
20 | along with this program. If not, see http://www.gnu.org/licenses/.
21 |
22 |
23 | This module implements handlers for "What is X?" type queries,
24 | i.e. "Hvað er X?".
25 |
26 | The module is currently disabled.
27 |
28 | """
29 |
30 | from typing import Set
31 |
32 | from queries import ResponseType, QueryStateDict
33 | from queries.util import read_grammar_file
34 | from tree import Node, ParamList, Result
35 |
36 | # --- Begin "magic" module constants ---
37 |
38 | # The following constants - HANDLE_TREE, PRIORITY and GRAMMAR -
39 | # are "magic"; they are read by query.py to determine how to
40 | # integrate this query module into the server's set of active modules.
41 |
42 | # Indicate that this module wants to handle parse trees for queries
43 | HANDLE_TREE = True
44 |
45 | # Invoke this processor before other tree processors
46 | PRIORITY = 1
47 |
48 | QUERY_NONTERMINALS: Set[str] = set() # { "QWhatIsQuery" }
49 |
50 | GRAMMAR = read_grammar_file("whatis")
51 |
52 | # --- End of "magic" module constants ---
53 |
54 |
55 | def QWhatIsEntity(node: Node, params: ParamList, result: Result) -> None:
56 | result.qtype = "WhatIs"
57 | result.qkey = result._nominative
58 |
59 |
60 | def EfLiður(node: Node, params: ParamList, result: Result) -> None:
61 | """Eignarfallsliðir haldast óbreyttir,
62 | þ.e. þeim á ekki að breyta í nefnifall"""
63 | result._nominative = result._text
64 |
65 |
66 | def FsMeðFallstjórn(node: Node, params: ParamList, result: Result) -> None:
67 | """Forsetningarliðir haldast óbreyttir,
68 | þ.e. þeim á ekki að breyta í nefnifall"""
69 | result._nominative = result._text
70 |
71 |
72 | def sentence(state: QueryStateDict, result: Result) -> None:
73 | """Called when sentence processing is complete"""
74 | q = state["query"]
75 | if "qtype" not in result:
76 | q.set_error("E_QUERY_NOT_UNDERSTOOD")
77 | return
78 | # Successfully matched a query type
79 | q.set_qtype(result.qtype)
80 | q.set_key(result.qkey)
81 | # session = state.get("session")
82 | # Select a query function and exceute it
83 | answer: str = result.qtype + ": " + result.qkey
84 | voice_answer: str = answer
85 | response: ResponseType = dict(answer=answer)
86 | q.set_answer(response, answer, voice_answer)
87 |
--------------------------------------------------------------------------------
/requirements.txt:
--------------------------------------------------------------------------------
1 | # Flask
2 | werkzeug>=2.3.7
3 | Flask==2.3.3
4 | flask-caching>=2.3.1
5 | Flask-Cors>=5.0.1
6 | # DB
7 | psycopg2cffi==2.9.0
8 | SQLAlchemy==1.4.54
9 | sqlalchemy2-stubs>=0.0.2a38
10 | sqlalchemy-stubs>=0.4
11 | # Util
12 | cachetools>=5.5.2
13 | requests>=2.32.3
14 | typing-extensions>=4.13.2
15 | python-dotenv>=1.1.0
16 | # Scraping
17 | beautifulsoup4==4.13.4
18 | feedparser==6.0.11
19 | # Query modules
20 | pytz==2025.2
21 | timezonefinder==6.5.9
22 | rjsmin>=1.2.4
23 | python-youtube==0.9.1
24 | country-list>=1.1.0
25 | # For OpenAI GPT support
26 | openai==1.14.3
27 | httpx==0.27.2 # to address issue in old version of OpenAI API
28 | # Ours
29 | reynir>=3.5.7
30 | islenska>=1.0.3
31 | # Pinning old version of Icespeak since newer require
32 | # grpcio, which doesn't work under PyPy. :/
33 | icespeak @ git+https://github.com/mideind/Icespeak@greynir
34 | iceaddr>=0.5.8
35 | iceweather>=0.2.3
36 | cityloc>=0.1.1
37 | straeto>=1.4.1
38 |
39 |
--------------------------------------------------------------------------------
/resources/geo/us_state_name2code.json:
--------------------------------------------------------------------------------
1 | {
2 | "Alaska":"AK",
3 | "Alabama":"AL",
4 | "Arkansas":"AR",
5 | "Arizona":"AZ",
6 | "California":"CA",
7 | "Kalifornía":"CA",
8 | "Colorado":"CO",
9 | "Koloradó":"CO",
10 | "Connecticut":"CT",
11 | "District of Columbia":"DC",
12 | "Delaware":"DE",
13 | "Florida":"FL",
14 | "Flórída":"FL",
15 | "Florída":"FL",
16 | "Flórida":"FL",
17 | "Georgia":"GA",
18 | "Georgía":"GA",
19 | "Hawaii":"HI",
20 | "Havaí":"HI",
21 | "Havæ": "HI",
22 | "Iowa":"IA",
23 | "Idaho":"ID",
24 | "Idahó":"ID",
25 | "Illinois":"IL",
26 | "Indiana":"IN",
27 | "Kansas":"KS",
28 | "Kentucky":"KY",
29 | "Louisiana":"LA",
30 | "Massachusetts":"MA",
31 | "Maryland":"MD",
32 | "Maine":"ME",
33 | "Michigan":"MI",
34 | "Minnesota":"MN",
35 | "Minnesóta":"MN",
36 | "Missouri":"MO",
37 | "Mississippi":"MS",
38 | "Montana":"MT",
39 | "North Carolina":"NC",
40 | "Norður-Karólína":"NC",
41 | "North Dakota":"ND",
42 | "Norður-Dakóta":"ND",
43 | "Nebraska":"NE",
44 | "New Hampshire":"NH",
45 | "New Jersey":"NJ",
46 | "New Mexico":"NM",
47 | "Nýja Mexíkó":"NM",
48 | "Nevada":"NV",
49 | "New York":"NY",
50 | "Ohio":"OH",
51 | "Oklahoma":"OK",
52 | "Óklahóma":"OK",
53 | "Oklahóma":"OK",
54 | "Óklahoma":"OK",
55 | "Oregon":"OR",
56 | "Óregon":"OR",
57 | "Pennsylvania":"PA",
58 | "Pennsylvanía":"PA",
59 | "Puerto Rico":"PR",
60 | "Púertó Ríkó":"PR",
61 | "Rhode Island":"RI",
62 | "South Carolina":"SC",
63 | "Suður-Karólína":"SC",
64 | "South Dakota":"SD",
65 | "Suður-Dakóta":"SD",
66 | "Tennessee":"TN",
67 | "Texas":"TX",
68 | "Utah":"UT",
69 | "Virginia":"VA",
70 | "Virginía":"VA",
71 | "Vermont":"VT",
72 | "Washington":"WA",
73 | "Wisconsin":"WI",
74 | "West Virginia":"WV",
75 | "Vestur-Virginía":"WV",
76 | "Wyoming":"WY"
77 | }
--------------------------------------------------------------------------------
/scrapers/README.md:
--------------------------------------------------------------------------------
1 | # Greynir Scrapers
2 |
3 | This directory contains the code to Greynir's scraper modules, which extract text from
4 | a wide range of popular Icelandic news sites for subsequent processing. Currently, all
5 | active scrapers can be found in [`default.py`](default.py).
6 |
--------------------------------------------------------------------------------
/scrapers/__init__.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | """
3 | Greynir: Natural language processing for Icelandic
4 |
5 | scraper folder
6 |
7 | This is the location to put custom scraper helpers for
8 | specific URL roots.
9 |
10 | """
11 |
--------------------------------------------------------------------------------
/scripts/.ipython.py:
--------------------------------------------------------------------------------
1 | # type: ignore
2 | # Greynir configuration file for ipython.
3 |
4 | from platform import python_version, python_implementation
5 |
6 | c.TerminalInteractiveShell.confirm_exit = False
7 | c.InteractiveShellApp.exec_PYTHONSTARTUP = False
8 |
9 | c.InteractiveShell.banner1 = "Python %s (%s)" % (python_version(), python_implementation())
10 | c.InteractiveShell.banner2 = 'Welcome to the Greynir IPython shell!\n'
11 |
12 | c.InteractiveShellApp.extensions = ['autoreload']
13 |
14 | c.InteractiveShellApp.exec_lines = [
15 | 'from db import *',
16 | 'from db.models import *',
17 | 's = SessionContext(commit=False).__enter__()',
18 | 'from reynir import Greynir',
19 | 'g = Greynir()'
20 | ]
21 |
--------------------------------------------------------------------------------
/scripts/deploy.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | #
3 | # deploy.sh
4 | #
5 | # Deployment script for greynir.is
6 | #
7 | # Prompts for confirmation before copying files over
8 | #
9 | # Defaults to deploying to production.
10 | # Run with argument "staging" to deploy to staging
11 |
12 | # set -o errexit # Exit when a command fails
13 | # set -o nounset # Disallow unset variables
14 | # set -o pipefail # Pipeline command fails if any command fails
15 |
16 | SRC=~/github/Greynir
17 | MODE="PRODUCTION"
18 | DEST="/usr/share/nginx/greynir.is" # Production
19 | SERVICE="greynir"
20 |
21 | # Check first argument
22 | if [[ "$1" = "staging" ]]; then
23 | MODE="STAGING"
24 | DEST="/usr/share/nginx/staging.greynir.is" # Staging
25 | SERVICE="staging"
26 | fi
27 |
28 | read -rp "This will deploy Greynir to **${MODE}**. Confirm? (y/n): " CONFIRMED
29 |
30 | if [[ "$CONFIRMED" != "y" ]]; then
31 | echo "Deployment aborted"
32 | exit 1
33 | fi
34 |
35 | echo "Deploying $SRC to $DEST..."
36 |
37 | cd $SRC || exit 1
38 |
39 | cp requirements.txt $DEST/requirements.txt
40 |
41 | cd $DEST || exit 1
42 |
43 | # echo "Upgrading dependencies according to requirements.txt"
44 |
45 | # shellcheck disable=SC1091
46 | source "venv/bin/activate"
47 | pip install --upgrade pip wheel setuptools
48 | pip install --upgrade -r requirements.txt
49 | deactivate
50 |
51 | echo "Removing binary grammar files"
52 | rm venv/site-packages/reynir/Greynir.grammar.bin
53 | rm venv/site-packages/reynir/Greynir.grammar.query.bin
54 |
55 | cd $SRC || exit 1
56 |
57 | echo "Copying files"
58 |
59 | cp config/Index.conf $DEST/config/Index.conf
60 | # Note: config/Greynir.conf is not copied
61 |
62 | cp .env $DEST/.env
63 | cp article.py $DEST/article.py
64 | cp fetcher.py $DEST/fetcher.py
65 | cp geo.py $DEST/geo.py
66 | cp images.py $DEST/images.py
67 | cp main.py $DEST/main.py
68 | cp nertokenizer.py $DEST/nertokenizer.py
69 | cp postagger.py $DEST/postagger.py
70 | cp processor.py $DEST/processor.py
71 | cp scraper.py $DEST/scraper.py
72 | cp search.py $DEST/search.py
73 | cp settings.py $DEST/settings.py
74 | cp similar.py $DEST/similar.py
75 | cp tnttagger.py $DEST/tnttagger.py
76 | cp tts.py $DEST/tts.py
77 | cp utility.py $DEST/utility.py
78 | cp -r db $DEST/
79 | cp -r routes $DEST/
80 | cp -r tree $DEST/
81 | cp scrapers/*.py $DEST/scrapers/
82 | cp nn/*.py $DEST/nn/
83 |
84 | # Sync templates, static files and queries
85 | rm -rf queries/__pycache__/
86 | rsync -av --delete processors/ $DEST/templates/
87 | rsync -av --delete templates/ $DEST/templates/
88 | rsync -av --delete static/ $DEST/static/
89 | rsync -av --delete queries/ $DEST/queries/
90 |
91 | cp -r resources/geo $DEST/resources/
92 |
93 | # Put a version identifier (date + commit ID) into the about.html template
94 | ABOUT_TPL="${DEST}/templates/about.html"
95 | sed -i "s/\[Þróunarútgáfa\]/Útgáfa $(date "+%Y-%m-%d %H:%M")/g" "${ABOUT_TPL}"
96 | GITVERS=$(git rev-parse HEAD) # Get git commit ID
97 | GITVERS=${GITVERS:0:7} # Truncate it
98 | sed -i "s/\[Git-útgáfa\]/${GITVERS}/g" "${ABOUT_TPL}"
99 |
100 | echo "Reloading gunicorn server..."
101 |
102 | sudo systemctl reload $SERVICE
103 |
104 | echo "Deployment done"
105 |
--------------------------------------------------------------------------------
/scripts/gen_embla_rec.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | #
3 | # Script to generate local voice recordings for the Embla voice assistant
4 | #
5 |
6 | set -o errexit # Exit when a command fails
7 | # set -o nounset # Disallow unset variables
8 |
9 | if [[ $# = 0 ]]; then
10 | echo "You must provide a voice name as argument"
11 | exit 1
12 | fi
13 |
14 | VOICE=$1
15 | VOICE_LOWER=$( echo "$VOICE" | tr '[:upper:]' '[:lower:]' )
16 |
17 | # Dunno variants
18 | python3 speak.py -w -f "pcm" --voice "$1" -n --override "dunno01-${VOICE_LOWER}.wav" "Ég get ekki svarað því."
19 | python3 speak.py -w -f "pcm" --voice "$1" -n --override "dunno02-${VOICE_LOWER}.wav" "Ég get því miður ekki svarað því."
20 | python3 speak.py -w -f "pcm" --voice "$1" -n --override "dunno03-${VOICE_LOWER}.wav" "Ég kann ekki svar við því."
21 | python3 speak.py -w -f "pcm" --voice "$1" -n --override "dunno04-${VOICE_LOWER}.wav" "Ég skil ekki þessa fyrirspurn."
22 | python3 speak.py -w -f "pcm" --voice "$1" -n --override "dunno05-${VOICE_LOWER}.wav" "Ég veit það ekki."
23 | python3 speak.py -w -f "pcm" --voice "$1" -n --override "dunno06-${VOICE_LOWER}.wav" "Því miður skildi ég þetta ekki."
24 | python3 speak.py -w -f "pcm" --voice "$1" -n --override "dunno07-${VOICE_LOWER}.wav" "Því miður veit ég það ekki."
25 |
26 | # Error messages
27 | python3 speak.py -w -f "pcm" --voice "$1" -n --override "err-${VOICE_LOWER}.wav" "Villa kom upp í samskiptum við netþjón."
28 | python3 speak.py -w -f "pcm" --voice "$1" -n --override "conn-${VOICE_LOWER}.wav" "Ekki næst samband við netið."
29 | python3 speak.py -w -f "pcm" --voice "$1" -n --override "nomic-${VOICE_LOWER}.wav" "Mig vantar heimild til að nota hljóðnema."
30 |
31 | # My name is
32 | python3 speak.py -w -f "pcm" --voice "$1" -n --override "mynameis-${VOICE_LOWER}.wav" "Svona hljómar þessi rödd."
33 |
34 | # Voice speed
35 | python3 speak.py -w -f "pcm" --voice "$1" -n --override "voicespeed-${VOICE_LOWER}.wav" "Svona hljómar þessi hraði."
36 |
--------------------------------------------------------------------------------
/scripts/prune_queries.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | #
3 | # Purge all logged queries in queries table older than 30 days
4 | #
5 |
6 | psql -h "greynir.is" -U reynir -d scraper -c \
7 | "DELETE FROM queries WHERE timestamp < NOW() - INTERVAL '30 days';"
8 |
--------------------------------------------------------------------------------
/scripts/runreparse.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | #
3 | # This is run once every morning by cron
4 | # Reparses and reprocesses previously parsed articles
5 | #
6 |
7 | set -o errexit # Exit when a command fails
8 | # set -o nounset # Disallow unset variables
9 | set -o pipefail # Pipeline command fails if any command fails
10 |
11 | cd ~/Greynir || exit 1
12 | # shellcheck disable=SC1091
13 | source venv/bin/activate
14 | GREYNIR_DB_HOST="greynir.is" timeout 120m python scraper.py --reparse --limit=5000
15 | GREYNIR_DB_HOST="greynir.is" timeout 30m python processor.py --update --limit=5000
16 | deactivate
17 |
--------------------------------------------------------------------------------
/scripts/runscraper.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | #
3 | # Run scraper and processor programs
4 | #
5 |
6 | set -o errexit # Exit when a command fails
7 | # set -o nounset # Disallow unset variables
8 | set -o pipefail # Pipeline command fails if any command fails
9 |
10 | # Scraper
11 | cd ~/Greynir || exit 1
12 | # shellcheck disable=SC1091
13 | source venv/bin/activate
14 | GREYNIR_DB_HOST="greynir.is" timeout 20m python scraper.py --limit=2500
15 | # Use control group to limit memory usage and swap
16 | #GREYNIR_DB_HOST="greynir.is" timeout 20m cgexec -g "memory:scraper" python scraper.py --limit=2500
17 | deactivate
18 |
19 | # Processor
20 | cd ~/Greynir || exit 1
21 | # shellcheck disable=SC1091
22 | source venv/bin/activate
23 | GREYNIR_DB_HOST="greynir.is" timeout 20m python processor.py --limit=3000
24 | deactivate
25 |
--------------------------------------------------------------------------------
/scripts/runtagger.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | #
3 | # Run topic vector tagging program
4 | #
5 |
6 | # Tagger
7 | cd ~/github/Greynir/vectors || exit 1
8 | # shellcheck disable=SC1091
9 | source venv/bin/activate
10 | GREYNIR_DB_HOST="greynir.is" timeout 20m python builder.py --limit=2500 --notify tag
11 | deactivate
12 |
--------------------------------------------------------------------------------
/scripts/shell.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | #
3 | # Start IPython shell using config stored in repository
4 | #
5 |
6 | set -o errexit # Exit when a command fails
7 | # set -o nounset # Disallow unset variables
8 | set -o pipefail # Pipeline command fails if any command fails
9 |
10 | command -v ipython >/dev/null 2>&1 || \
11 | { echo >&2 "Requires IPython. Run 'pip install ipython'."; exit 1; }
12 |
13 | SCRIPT_DIR=$(dirname "$0")
14 | CONFIG_PATH="${SCRIPT_DIR}/.ipython.py"
15 |
16 | if [ ! -e "$CONFIG_PATH" ]; then
17 | echo "Warning: IPython config not found at ${CONFIG_PATH}"
18 | fi
19 |
20 | # Change to parent directory of the script
21 | # This should be the repo root
22 | cd "$SCRIPT_DIR/.." || exit 1
23 |
24 | # Make sure we're running in a virtual environment
25 | if [ -z "$VIRTUAL_ENV" ]; then
26 | echo "Not running in a virtualenv"
27 | exit
28 | fi
29 |
30 | VENV_DIR="$(basename "$VIRTUAL_ENV")"
31 |
32 | if [ ! -d "$VENV_DIR" ]; then
33 | echo "virtualenv directory '${VENV_DIR}' not found"
34 | exit
35 | fi
36 |
37 | # Run IPython shell with custom configuration
38 | ipython --config="${CONFIG_PATH}" --pprint --no-simple-prompt
39 |
--------------------------------------------------------------------------------
/scripts/start.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | GREYNIR_DB_HOST=greynir.is GREYNIR_PORT=5000 python main.py
4 |
--------------------------------------------------------------------------------
/scripts/tts_audio_cleanup.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # Delete all text-to-speech audio scratch files older than 1 day (24 hours)
4 | find /usr/share/nginx/greynir.is/static/audio/tmp/* -mtime +1 -exec rm {} \;
5 |
--------------------------------------------------------------------------------
/static/404.html:
--------------------------------------------------------------------------------
1 | ../templates/404.html
--------------------------------------------------------------------------------
/static/500.html:
--------------------------------------------------------------------------------
1 | ../templates/500.html
--------------------------------------------------------------------------------
/static/audio/tmp/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/audio/tmp/.gitkeep
--------------------------------------------------------------------------------
/static/browserconfig.xml:
--------------------------------------------------------------------------------
1 |
2 | #ffffff
--------------------------------------------------------------------------------
/static/files/Greynir-Terms-2020-03-11.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/files/Greynir-Terms-2020-03-11.pdf
--------------------------------------------------------------------------------
/static/fonts/glyphicons-regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/fonts/glyphicons-regular.woff
--------------------------------------------------------------------------------
/static/fonts/glyphicons-regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/fonts/glyphicons-regular.woff2
--------------------------------------------------------------------------------
/static/fonts/lato-v16-latin-700.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/fonts/lato-v16-latin-700.woff
--------------------------------------------------------------------------------
/static/fonts/lato-v16-latin-700.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/fonts/lato-v16-latin-700.woff2
--------------------------------------------------------------------------------
/static/fonts/lato-v16-latin-700italic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/fonts/lato-v16-latin-700italic.woff
--------------------------------------------------------------------------------
/static/fonts/lato-v16-latin-700italic.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/fonts/lato-v16-latin-700italic.woff2
--------------------------------------------------------------------------------
/static/fonts/lato-v16-latin-italic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/fonts/lato-v16-latin-italic.woff
--------------------------------------------------------------------------------
/static/fonts/lato-v16-latin-italic.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/fonts/lato-v16-latin-italic.woff2
--------------------------------------------------------------------------------
/static/fonts/lato-v16-latin-regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/fonts/lato-v16-latin-regular.woff
--------------------------------------------------------------------------------
/static/fonts/lato-v16-latin-regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/fonts/lato-v16-latin-regular.woff2
--------------------------------------------------------------------------------
/static/fonts/oswald-v31-latin-regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/fonts/oswald-v31-latin-regular.woff
--------------------------------------------------------------------------------
/static/fonts/oswald-v31-latin-regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/fonts/oswald-v31-latin-regular.woff2
--------------------------------------------------------------------------------
/static/img/Blurb1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/Blurb1.png
--------------------------------------------------------------------------------
/static/img/GPLv3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/GPLv3.png
--------------------------------------------------------------------------------
/static/img/GreynirLogoHoriz180x80.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/GreynirLogoHoriz180x80.png
--------------------------------------------------------------------------------
/static/img/GreynirLogoVertical.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/GreynirLogoVertical.png
--------------------------------------------------------------------------------
/static/img/GreynirLogoVertical200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/GreynirLogoVertical200.png
--------------------------------------------------------------------------------
/static/img/android-icon-144x144.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/android-icon-144x144.png
--------------------------------------------------------------------------------
/static/img/android-icon-192x192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/android-icon-192x192.png
--------------------------------------------------------------------------------
/static/img/android-icon-36x36.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/android-icon-36x36.png
--------------------------------------------------------------------------------
/static/img/android-icon-48x48.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/android-icon-48x48.png
--------------------------------------------------------------------------------
/static/img/android-icon-72x72.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/android-icon-72x72.png
--------------------------------------------------------------------------------
/static/img/android-icon-96x96.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/android-icon-96x96.png
--------------------------------------------------------------------------------
/static/img/apple-icon-114x114.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/apple-icon-114x114.png
--------------------------------------------------------------------------------
/static/img/apple-icon-120x120.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/apple-icon-120x120.png
--------------------------------------------------------------------------------
/static/img/apple-icon-144x144.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/apple-icon-144x144.png
--------------------------------------------------------------------------------
/static/img/apple-icon-152x152.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/apple-icon-152x152.png
--------------------------------------------------------------------------------
/static/img/apple-icon-180x180.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/apple-icon-180x180.png
--------------------------------------------------------------------------------
/static/img/apple-icon-57x57.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/apple-icon-57x57.png
--------------------------------------------------------------------------------
/static/img/apple-icon-60x60.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/apple-icon-60x60.png
--------------------------------------------------------------------------------
/static/img/apple-icon-72x72.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/apple-icon-72x72.png
--------------------------------------------------------------------------------
/static/img/apple-icon-76x76.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/apple-icon-76x76.png
--------------------------------------------------------------------------------
/static/img/apple-icon-precomposed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/apple-icon-precomposed.png
--------------------------------------------------------------------------------
/static/img/apple-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/apple-icon.png
--------------------------------------------------------------------------------
/static/img/favicon-16x16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/favicon-16x16.png
--------------------------------------------------------------------------------
/static/img/favicon-32x32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/favicon-32x32.png
--------------------------------------------------------------------------------
/static/img/favicon-96x96.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/favicon-96x96.png
--------------------------------------------------------------------------------
/static/img/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/favicon.ico
--------------------------------------------------------------------------------
/static/img/flags/AD.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/AD.png
--------------------------------------------------------------------------------
/static/img/flags/AE.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/AE.png
--------------------------------------------------------------------------------
/static/img/flags/AF.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/AF.png
--------------------------------------------------------------------------------
/static/img/flags/AG.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/AG.png
--------------------------------------------------------------------------------
/static/img/flags/AI.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/AI.png
--------------------------------------------------------------------------------
/static/img/flags/AL.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/AL.png
--------------------------------------------------------------------------------
/static/img/flags/AM.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/AM.png
--------------------------------------------------------------------------------
/static/img/flags/AN.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/AN.png
--------------------------------------------------------------------------------
/static/img/flags/AO.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/AO.png
--------------------------------------------------------------------------------
/static/img/flags/AQ.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/AQ.png
--------------------------------------------------------------------------------
/static/img/flags/AR.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/AR.png
--------------------------------------------------------------------------------
/static/img/flags/AS.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/AS.png
--------------------------------------------------------------------------------
/static/img/flags/AT.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/AT.png
--------------------------------------------------------------------------------
/static/img/flags/AU.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/AU.png
--------------------------------------------------------------------------------
/static/img/flags/AW.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/AW.png
--------------------------------------------------------------------------------
/static/img/flags/AX.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/AX.png
--------------------------------------------------------------------------------
/static/img/flags/AZ.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/AZ.png
--------------------------------------------------------------------------------
/static/img/flags/BA.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/BA.png
--------------------------------------------------------------------------------
/static/img/flags/BB.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/BB.png
--------------------------------------------------------------------------------
/static/img/flags/BD.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/BD.png
--------------------------------------------------------------------------------
/static/img/flags/BE.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/BE.png
--------------------------------------------------------------------------------
/static/img/flags/BF.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/BF.png
--------------------------------------------------------------------------------
/static/img/flags/BG.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/BG.png
--------------------------------------------------------------------------------
/static/img/flags/BH.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/BH.png
--------------------------------------------------------------------------------
/static/img/flags/BI.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/BI.png
--------------------------------------------------------------------------------
/static/img/flags/BJ.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/BJ.png
--------------------------------------------------------------------------------
/static/img/flags/BL.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/BL.png
--------------------------------------------------------------------------------
/static/img/flags/BM.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/BM.png
--------------------------------------------------------------------------------
/static/img/flags/BN.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/BN.png
--------------------------------------------------------------------------------
/static/img/flags/BO.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/BO.png
--------------------------------------------------------------------------------
/static/img/flags/BQ.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/BQ.png
--------------------------------------------------------------------------------
/static/img/flags/BR.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/BR.png
--------------------------------------------------------------------------------
/static/img/flags/BS.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/BS.png
--------------------------------------------------------------------------------
/static/img/flags/BT.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/BT.png
--------------------------------------------------------------------------------
/static/img/flags/BV.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/BV.png
--------------------------------------------------------------------------------
/static/img/flags/BW.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/BW.png
--------------------------------------------------------------------------------
/static/img/flags/BY.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/BY.png
--------------------------------------------------------------------------------
/static/img/flags/BZ.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/BZ.png
--------------------------------------------------------------------------------
/static/img/flags/CA.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/CA.png
--------------------------------------------------------------------------------
/static/img/flags/CC.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/CC.png
--------------------------------------------------------------------------------
/static/img/flags/CD.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/CD.png
--------------------------------------------------------------------------------
/static/img/flags/CF.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/CF.png
--------------------------------------------------------------------------------
/static/img/flags/CG.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/CG.png
--------------------------------------------------------------------------------
/static/img/flags/CH.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/CH.png
--------------------------------------------------------------------------------
/static/img/flags/CI.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/CI.png
--------------------------------------------------------------------------------
/static/img/flags/CK.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/CK.png
--------------------------------------------------------------------------------
/static/img/flags/CL.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/CL.png
--------------------------------------------------------------------------------
/static/img/flags/CM.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/CM.png
--------------------------------------------------------------------------------
/static/img/flags/CN.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/CN.png
--------------------------------------------------------------------------------
/static/img/flags/CO.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/CO.png
--------------------------------------------------------------------------------
/static/img/flags/CR.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/CR.png
--------------------------------------------------------------------------------
/static/img/flags/CU.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/CU.png
--------------------------------------------------------------------------------
/static/img/flags/CV.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/CV.png
--------------------------------------------------------------------------------
/static/img/flags/CW.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/CW.png
--------------------------------------------------------------------------------
/static/img/flags/CX.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/CX.png
--------------------------------------------------------------------------------
/static/img/flags/CY.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/CY.png
--------------------------------------------------------------------------------
/static/img/flags/CZ.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/CZ.png
--------------------------------------------------------------------------------
/static/img/flags/DE.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/DE.png
--------------------------------------------------------------------------------
/static/img/flags/DJ.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/DJ.png
--------------------------------------------------------------------------------
/static/img/flags/DK.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/DK.png
--------------------------------------------------------------------------------
/static/img/flags/DM.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/DM.png
--------------------------------------------------------------------------------
/static/img/flags/DO.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/DO.png
--------------------------------------------------------------------------------
/static/img/flags/DZ.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/DZ.png
--------------------------------------------------------------------------------
/static/img/flags/EC.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/EC.png
--------------------------------------------------------------------------------
/static/img/flags/EE.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/EE.png
--------------------------------------------------------------------------------
/static/img/flags/EG.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/EG.png
--------------------------------------------------------------------------------
/static/img/flags/EH.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/EH.png
--------------------------------------------------------------------------------
/static/img/flags/ER.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/ER.png
--------------------------------------------------------------------------------
/static/img/flags/ES.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/ES.png
--------------------------------------------------------------------------------
/static/img/flags/ET.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/ET.png
--------------------------------------------------------------------------------
/static/img/flags/EU.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/EU.png
--------------------------------------------------------------------------------
/static/img/flags/FI.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/FI.png
--------------------------------------------------------------------------------
/static/img/flags/FJ.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/FJ.png
--------------------------------------------------------------------------------
/static/img/flags/FK.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/FK.png
--------------------------------------------------------------------------------
/static/img/flags/FM.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/FM.png
--------------------------------------------------------------------------------
/static/img/flags/FO.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/FO.png
--------------------------------------------------------------------------------
/static/img/flags/FR.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/FR.png
--------------------------------------------------------------------------------
/static/img/flags/GA.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/GA.png
--------------------------------------------------------------------------------
/static/img/flags/GB-ENG.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/GB-ENG.png
--------------------------------------------------------------------------------
/static/img/flags/GB-NIR.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/GB-NIR.png
--------------------------------------------------------------------------------
/static/img/flags/GB-SCT.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/GB-SCT.png
--------------------------------------------------------------------------------
/static/img/flags/GB-WLS.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/GB-WLS.png
--------------------------------------------------------------------------------
/static/img/flags/GB.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/GB.png
--------------------------------------------------------------------------------
/static/img/flags/GD.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/GD.png
--------------------------------------------------------------------------------
/static/img/flags/GE.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/GE.png
--------------------------------------------------------------------------------
/static/img/flags/GF.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/GF.png
--------------------------------------------------------------------------------
/static/img/flags/GG.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/GG.png
--------------------------------------------------------------------------------
/static/img/flags/GH.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/GH.png
--------------------------------------------------------------------------------
/static/img/flags/GI.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/GI.png
--------------------------------------------------------------------------------
/static/img/flags/GL.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/GL.png
--------------------------------------------------------------------------------
/static/img/flags/GM.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/GM.png
--------------------------------------------------------------------------------
/static/img/flags/GN.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/GN.png
--------------------------------------------------------------------------------
/static/img/flags/GP.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/GP.png
--------------------------------------------------------------------------------
/static/img/flags/GQ.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/GQ.png
--------------------------------------------------------------------------------
/static/img/flags/GR.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/GR.png
--------------------------------------------------------------------------------
/static/img/flags/GS.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/GS.png
--------------------------------------------------------------------------------
/static/img/flags/GT.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/GT.png
--------------------------------------------------------------------------------
/static/img/flags/GU.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/GU.png
--------------------------------------------------------------------------------
/static/img/flags/GW.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/GW.png
--------------------------------------------------------------------------------
/static/img/flags/GY.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/GY.png
--------------------------------------------------------------------------------
/static/img/flags/HK.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/HK.png
--------------------------------------------------------------------------------
/static/img/flags/HM.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/HM.png
--------------------------------------------------------------------------------
/static/img/flags/HN.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/HN.png
--------------------------------------------------------------------------------
/static/img/flags/HR.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/HR.png
--------------------------------------------------------------------------------
/static/img/flags/HT.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/HT.png
--------------------------------------------------------------------------------
/static/img/flags/HU.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/HU.png
--------------------------------------------------------------------------------
/static/img/flags/IC.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/IC.png
--------------------------------------------------------------------------------
/static/img/flags/ID.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/ID.png
--------------------------------------------------------------------------------
/static/img/flags/IE.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/IE.png
--------------------------------------------------------------------------------
/static/img/flags/IL.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/IL.png
--------------------------------------------------------------------------------
/static/img/flags/IM.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/IM.png
--------------------------------------------------------------------------------
/static/img/flags/IN.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/IN.png
--------------------------------------------------------------------------------
/static/img/flags/IO.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/IO.png
--------------------------------------------------------------------------------
/static/img/flags/IQ.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/IQ.png
--------------------------------------------------------------------------------
/static/img/flags/IR.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/IR.png
--------------------------------------------------------------------------------
/static/img/flags/IS.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/IS.png
--------------------------------------------------------------------------------
/static/img/flags/IT.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/IT.png
--------------------------------------------------------------------------------
/static/img/flags/JE.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/JE.png
--------------------------------------------------------------------------------
/static/img/flags/JM.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/JM.png
--------------------------------------------------------------------------------
/static/img/flags/JO.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/JO.png
--------------------------------------------------------------------------------
/static/img/flags/JP.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/JP.png
--------------------------------------------------------------------------------
/static/img/flags/KE.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/KE.png
--------------------------------------------------------------------------------
/static/img/flags/KG.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/KG.png
--------------------------------------------------------------------------------
/static/img/flags/KH.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/KH.png
--------------------------------------------------------------------------------
/static/img/flags/KI.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/KI.png
--------------------------------------------------------------------------------
/static/img/flags/KM.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/KM.png
--------------------------------------------------------------------------------
/static/img/flags/KN.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/KN.png
--------------------------------------------------------------------------------
/static/img/flags/KP.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/KP.png
--------------------------------------------------------------------------------
/static/img/flags/KR.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/KR.png
--------------------------------------------------------------------------------
/static/img/flags/KW.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/KW.png
--------------------------------------------------------------------------------
/static/img/flags/KY.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/KY.png
--------------------------------------------------------------------------------
/static/img/flags/KZ.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/KZ.png
--------------------------------------------------------------------------------
/static/img/flags/LA.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/LA.png
--------------------------------------------------------------------------------
/static/img/flags/LB.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/LB.png
--------------------------------------------------------------------------------
/static/img/flags/LC.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/LC.png
--------------------------------------------------------------------------------
/static/img/flags/LI.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/LI.png
--------------------------------------------------------------------------------
/static/img/flags/LK.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/LK.png
--------------------------------------------------------------------------------
/static/img/flags/LR.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/LR.png
--------------------------------------------------------------------------------
/static/img/flags/LS.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/LS.png
--------------------------------------------------------------------------------
/static/img/flags/LT.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/LT.png
--------------------------------------------------------------------------------
/static/img/flags/LU.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/LU.png
--------------------------------------------------------------------------------
/static/img/flags/LV.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/LV.png
--------------------------------------------------------------------------------
/static/img/flags/LY.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/LY.png
--------------------------------------------------------------------------------
/static/img/flags/MA.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/MA.png
--------------------------------------------------------------------------------
/static/img/flags/MC.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/MC.png
--------------------------------------------------------------------------------
/static/img/flags/MD.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/MD.png
--------------------------------------------------------------------------------
/static/img/flags/ME.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/ME.png
--------------------------------------------------------------------------------
/static/img/flags/MF.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/MF.png
--------------------------------------------------------------------------------
/static/img/flags/MG.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/MG.png
--------------------------------------------------------------------------------
/static/img/flags/MH.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/MH.png
--------------------------------------------------------------------------------
/static/img/flags/MK.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/MK.png
--------------------------------------------------------------------------------
/static/img/flags/ML.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/ML.png
--------------------------------------------------------------------------------
/static/img/flags/MM.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/MM.png
--------------------------------------------------------------------------------
/static/img/flags/MN.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/MN.png
--------------------------------------------------------------------------------
/static/img/flags/MO.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/MO.png
--------------------------------------------------------------------------------
/static/img/flags/MP.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/MP.png
--------------------------------------------------------------------------------
/static/img/flags/MQ.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/MQ.png
--------------------------------------------------------------------------------
/static/img/flags/MR.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/MR.png
--------------------------------------------------------------------------------
/static/img/flags/MS.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/MS.png
--------------------------------------------------------------------------------
/static/img/flags/MT.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/MT.png
--------------------------------------------------------------------------------
/static/img/flags/MU.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/MU.png
--------------------------------------------------------------------------------
/static/img/flags/MV.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/MV.png
--------------------------------------------------------------------------------
/static/img/flags/MW.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/MW.png
--------------------------------------------------------------------------------
/static/img/flags/MX.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/MX.png
--------------------------------------------------------------------------------
/static/img/flags/MY.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/MY.png
--------------------------------------------------------------------------------
/static/img/flags/MZ.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/MZ.png
--------------------------------------------------------------------------------
/static/img/flags/NA.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/NA.png
--------------------------------------------------------------------------------
/static/img/flags/NC.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/NC.png
--------------------------------------------------------------------------------
/static/img/flags/NE.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/NE.png
--------------------------------------------------------------------------------
/static/img/flags/NF.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/NF.png
--------------------------------------------------------------------------------
/static/img/flags/NG.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/NG.png
--------------------------------------------------------------------------------
/static/img/flags/NI.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/NI.png
--------------------------------------------------------------------------------
/static/img/flags/NL.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/NL.png
--------------------------------------------------------------------------------
/static/img/flags/NO.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/NO.png
--------------------------------------------------------------------------------
/static/img/flags/NP.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/NP.png
--------------------------------------------------------------------------------
/static/img/flags/NR.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/NR.png
--------------------------------------------------------------------------------
/static/img/flags/NU.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/NU.png
--------------------------------------------------------------------------------
/static/img/flags/NZ.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/NZ.png
--------------------------------------------------------------------------------
/static/img/flags/OM.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/OM.png
--------------------------------------------------------------------------------
/static/img/flags/PA.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/PA.png
--------------------------------------------------------------------------------
/static/img/flags/PE.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/PE.png
--------------------------------------------------------------------------------
/static/img/flags/PF.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/PF.png
--------------------------------------------------------------------------------
/static/img/flags/PG.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/PG.png
--------------------------------------------------------------------------------
/static/img/flags/PH.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/PH.png
--------------------------------------------------------------------------------
/static/img/flags/PK.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/PK.png
--------------------------------------------------------------------------------
/static/img/flags/PL.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/PL.png
--------------------------------------------------------------------------------
/static/img/flags/PM.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/PM.png
--------------------------------------------------------------------------------
/static/img/flags/PN.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/PN.png
--------------------------------------------------------------------------------
/static/img/flags/PR.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/PR.png
--------------------------------------------------------------------------------
/static/img/flags/PS.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/PS.png
--------------------------------------------------------------------------------
/static/img/flags/PT.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/PT.png
--------------------------------------------------------------------------------
/static/img/flags/PW.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/PW.png
--------------------------------------------------------------------------------
/static/img/flags/PY.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/PY.png
--------------------------------------------------------------------------------
/static/img/flags/QA.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/QA.png
--------------------------------------------------------------------------------
/static/img/flags/RE.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/RE.png
--------------------------------------------------------------------------------
/static/img/flags/RO.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/RO.png
--------------------------------------------------------------------------------
/static/img/flags/RS.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/RS.png
--------------------------------------------------------------------------------
/static/img/flags/RU.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/RU.png
--------------------------------------------------------------------------------
/static/img/flags/RW.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/RW.png
--------------------------------------------------------------------------------
/static/img/flags/SA.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/SA.png
--------------------------------------------------------------------------------
/static/img/flags/SB.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/SB.png
--------------------------------------------------------------------------------
/static/img/flags/SC.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/SC.png
--------------------------------------------------------------------------------
/static/img/flags/SD.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/SD.png
--------------------------------------------------------------------------------
/static/img/flags/SE.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/SE.png
--------------------------------------------------------------------------------
/static/img/flags/SG.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/SG.png
--------------------------------------------------------------------------------
/static/img/flags/SH.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/SH.png
--------------------------------------------------------------------------------
/static/img/flags/SI.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/SI.png
--------------------------------------------------------------------------------
/static/img/flags/SJ.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/SJ.png
--------------------------------------------------------------------------------
/static/img/flags/SK.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/SK.png
--------------------------------------------------------------------------------
/static/img/flags/SL.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/SL.png
--------------------------------------------------------------------------------
/static/img/flags/SM.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/SM.png
--------------------------------------------------------------------------------
/static/img/flags/SN.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/SN.png
--------------------------------------------------------------------------------
/static/img/flags/SO.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/SO.png
--------------------------------------------------------------------------------
/static/img/flags/SR.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/SR.png
--------------------------------------------------------------------------------
/static/img/flags/SS.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/SS.png
--------------------------------------------------------------------------------
/static/img/flags/ST.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/ST.png
--------------------------------------------------------------------------------
/static/img/flags/SV.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/SV.png
--------------------------------------------------------------------------------
/static/img/flags/SX.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/SX.png
--------------------------------------------------------------------------------
/static/img/flags/SY.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/SY.png
--------------------------------------------------------------------------------
/static/img/flags/SZ.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/SZ.png
--------------------------------------------------------------------------------
/static/img/flags/TC.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/TC.png
--------------------------------------------------------------------------------
/static/img/flags/TD.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/TD.png
--------------------------------------------------------------------------------
/static/img/flags/TF.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/TF.png
--------------------------------------------------------------------------------
/static/img/flags/TG.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/TG.png
--------------------------------------------------------------------------------
/static/img/flags/TH.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/TH.png
--------------------------------------------------------------------------------
/static/img/flags/TJ.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/TJ.png
--------------------------------------------------------------------------------
/static/img/flags/TK.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/TK.png
--------------------------------------------------------------------------------
/static/img/flags/TL.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/TL.png
--------------------------------------------------------------------------------
/static/img/flags/TM.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/TM.png
--------------------------------------------------------------------------------
/static/img/flags/TN.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/TN.png
--------------------------------------------------------------------------------
/static/img/flags/TO.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/TO.png
--------------------------------------------------------------------------------
/static/img/flags/TR.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/TR.png
--------------------------------------------------------------------------------
/static/img/flags/TT.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/TT.png
--------------------------------------------------------------------------------
/static/img/flags/TV.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/TV.png
--------------------------------------------------------------------------------
/static/img/flags/TW.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/TW.png
--------------------------------------------------------------------------------
/static/img/flags/TZ.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/TZ.png
--------------------------------------------------------------------------------
/static/img/flags/UA.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/UA.png
--------------------------------------------------------------------------------
/static/img/flags/UG.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/UG.png
--------------------------------------------------------------------------------
/static/img/flags/UM.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/UM.png
--------------------------------------------------------------------------------
/static/img/flags/US.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/US.png
--------------------------------------------------------------------------------
/static/img/flags/UY.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/UY.png
--------------------------------------------------------------------------------
/static/img/flags/UZ.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/UZ.png
--------------------------------------------------------------------------------
/static/img/flags/VA.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/VA.png
--------------------------------------------------------------------------------
/static/img/flags/VC.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/VC.png
--------------------------------------------------------------------------------
/static/img/flags/VE.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/VE.png
--------------------------------------------------------------------------------
/static/img/flags/VG.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/VG.png
--------------------------------------------------------------------------------
/static/img/flags/VI.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/VI.png
--------------------------------------------------------------------------------
/static/img/flags/VN.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/VN.png
--------------------------------------------------------------------------------
/static/img/flags/VU.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/VU.png
--------------------------------------------------------------------------------
/static/img/flags/WF.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/WF.png
--------------------------------------------------------------------------------
/static/img/flags/WS.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/WS.png
--------------------------------------------------------------------------------
/static/img/flags/XK.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/XK.png
--------------------------------------------------------------------------------
/static/img/flags/XS.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/XS.png
--------------------------------------------------------------------------------
/static/img/flags/YE.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/YE.png
--------------------------------------------------------------------------------
/static/img/flags/YT.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/YT.png
--------------------------------------------------------------------------------
/static/img/flags/ZA.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/ZA.png
--------------------------------------------------------------------------------
/static/img/flags/ZM.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/ZM.png
--------------------------------------------------------------------------------
/static/img/flags/ZW.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/flags/ZW.png
--------------------------------------------------------------------------------
/static/img/greynir-logo-large.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/greynir-logo-large.png
--------------------------------------------------------------------------------
/static/img/greynir_opengraph.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/greynir_opengraph.png
--------------------------------------------------------------------------------
/static/img/maps/continents/AF.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/maps/continents/AF.png
--------------------------------------------------------------------------------
/static/img/maps/continents/AN.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/maps/continents/AN.png
--------------------------------------------------------------------------------
/static/img/maps/continents/AS.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/maps/continents/AS.png
--------------------------------------------------------------------------------
/static/img/maps/continents/EU.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/maps/continents/EU.png
--------------------------------------------------------------------------------
/static/img/maps/continents/NA.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/maps/continents/NA.png
--------------------------------------------------------------------------------
/static/img/maps/continents/OC.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/maps/continents/OC.png
--------------------------------------------------------------------------------
/static/img/maps/continents/SA.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/maps/continents/SA.png
--------------------------------------------------------------------------------
/static/img/maps/regions/Austfirðir.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/maps/regions/Austfirðir.png
--------------------------------------------------------------------------------
/static/img/maps/regions/Austurland.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/maps/regions/Austurland.png
--------------------------------------------------------------------------------
/static/img/maps/regions/Mið-Austurland.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/maps/regions/Mið-Austurland.png
--------------------------------------------------------------------------------
/static/img/maps/regions/Norðausturland.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/maps/regions/Norðausturland.png
--------------------------------------------------------------------------------
/static/img/maps/regions/Norðurland.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/maps/regions/Norðurland.png
--------------------------------------------------------------------------------
/static/img/maps/regions/Norðvesturland.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/maps/regions/Norðvesturland.png
--------------------------------------------------------------------------------
/static/img/maps/regions/Suðurland.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/maps/regions/Suðurland.png
--------------------------------------------------------------------------------
/static/img/maps/regions/Suðurnes.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/maps/regions/Suðurnes.png
--------------------------------------------------------------------------------
/static/img/maps/regions/Suðvesturland.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/maps/regions/Suðvesturland.png
--------------------------------------------------------------------------------
/static/img/maps/regions/Vestfirðir.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/maps/regions/Vestfirðir.png
--------------------------------------------------------------------------------
/static/img/maps/regions/Vesturland.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/maps/regions/Vesturland.png
--------------------------------------------------------------------------------
/static/img/mideind-horizontal-large.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/mideind-horizontal-large.png
--------------------------------------------------------------------------------
/static/img/mideind-horizontal-small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/mideind-horizontal-small.png
--------------------------------------------------------------------------------
/static/img/mideind-logo-transparent-medium.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/mideind-logo-transparent-medium.png
--------------------------------------------------------------------------------
/static/img/ms-icon-144x144.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/ms-icon-144x144.png
--------------------------------------------------------------------------------
/static/img/ms-icon-150x150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/ms-icon-150x150.png
--------------------------------------------------------------------------------
/static/img/ms-icon-310x310.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/ms-icon-310x310.png
--------------------------------------------------------------------------------
/static/img/ms-icon-70x70.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/ms-icon-70x70.png
--------------------------------------------------------------------------------
/static/img/placeholder.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/placeholder.png
--------------------------------------------------------------------------------
/static/img/sources/bb.is.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/sources/bb.is.png
--------------------------------------------------------------------------------
/static/img/sources/bbl.is.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/sources/bbl.is.png
--------------------------------------------------------------------------------
/static/img/sources/dv.is.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/sources/dv.is.png
--------------------------------------------------------------------------------
/static/img/sources/eyjan.pressan.is.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/sources/eyjan.pressan.is.png
--------------------------------------------------------------------------------
/static/img/sources/fjarmalaraduneyti.is.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/sources/fjarmalaraduneyti.is.png
--------------------------------------------------------------------------------
/static/img/sources/forsaetisraduneyti.is.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/sources/forsaetisraduneyti.is.png
--------------------------------------------------------------------------------
/static/img/sources/frettabladid.is.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/sources/frettabladid.is.png
--------------------------------------------------------------------------------
/static/img/sources/hagstofa.is.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/sources/hagstofa.is.png
--------------------------------------------------------------------------------
/static/img/sources/heimildin.is.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/sources/heimildin.is.png
--------------------------------------------------------------------------------
/static/img/sources/hringbraut.is.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/sources/hringbraut.is.png
--------------------------------------------------------------------------------
/static/img/sources/innanrikisraduneyti.is.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/sources/innanrikisraduneyti.is.png
--------------------------------------------------------------------------------
/static/img/sources/kjarninn.is.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/sources/kjarninn.is.png
--------------------------------------------------------------------------------
/static/img/sources/kvennabladid.is.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/sources/kvennabladid.is.png
--------------------------------------------------------------------------------
/static/img/sources/lemurinn.is.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/sources/lemurinn.is.png
--------------------------------------------------------------------------------
/static/img/sources/mannlif.is.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/sources/mannlif.is.png
--------------------------------------------------------------------------------
/static/img/sources/mbl.is.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/sources/mbl.is.png
--------------------------------------------------------------------------------
/static/img/sources/ruv.is.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/sources/ruv.is.png
--------------------------------------------------------------------------------
/static/img/sources/samstodin.is.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/sources/samstodin.is.png
--------------------------------------------------------------------------------
/static/img/sources/sedlabanki.is.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/sources/sedlabanki.is.png
--------------------------------------------------------------------------------
/static/img/sources/stjornlagarad.is.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/sources/stjornlagarad.is.png
--------------------------------------------------------------------------------
/static/img/sources/stundin.is.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/sources/stundin.is.png
--------------------------------------------------------------------------------
/static/img/sources/utanrikisraduneyti.is.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/sources/utanrikisraduneyti.is.png
--------------------------------------------------------------------------------
/static/img/sources/vb.is.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/sources/vb.is.png
--------------------------------------------------------------------------------
/static/img/sources/visindavefur.is.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/sources/visindavefur.is.png
--------------------------------------------------------------------------------
/static/img/sources/visir.is.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/sources/visir.is.png
--------------------------------------------------------------------------------
/static/img/tree-example-small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/tree-example-small.png
--------------------------------------------------------------------------------
/static/img/tree-example.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/tree-example.png
--------------------------------------------------------------------------------
/static/img/vth.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mideind/GreynirServer/f18fa5b95f8a51c87437808b77baa6bf1ac88032/static/img/vth.jpg
--------------------------------------------------------------------------------
/static/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "App",
3 | "icons": [
4 | {
5 | "src": "\/android-icon-36x36.png",
6 | "sizes": "36x36",
7 | "type": "image\/png",
8 | "density": "0.75"
9 | },
10 | {
11 | "src": "\/android-icon-48x48.png",
12 | "sizes": "48x48",
13 | "type": "image\/png",
14 | "density": "1.0"
15 | },
16 | {
17 | "src": "\/android-icon-72x72.png",
18 | "sizes": "72x72",
19 | "type": "image\/png",
20 | "density": "1.5"
21 | },
22 | {
23 | "src": "\/android-icon-96x96.png",
24 | "sizes": "96x96",
25 | "type": "image\/png",
26 | "density": "2.0"
27 | },
28 | {
29 | "src": "\/android-icon-144x144.png",
30 | "sizes": "144x144",
31 | "type": "image\/png",
32 | "density": "3.0"
33 | },
34 | {
35 | "src": "\/android-icon-192x192.png",
36 | "sizes": "192x192",
37 | "type": "image\/png",
38 | "density": "4.0"
39 | }
40 | ]
41 | }
--------------------------------------------------------------------------------
/static/robots.txt:
--------------------------------------------------------------------------------
1 | User-agent: *
2 | Disallow: /query.api
3 | Disallow: /display.api
4 | Disallow: /analyze.api
5 | Disallow: /ifdtag.api
6 | Disallow: /postag.api
7 | Disallow: /parse.api
8 | Disallow: /article.api
9 | Disallow: /page*
10 |
11 | Crawl-delay: 120
12 |
13 | # Marketing scraper bots
14 | User-agent: MJ12bot
15 | Disallow: /
16 | User-agent: SemrushBot
17 | Disallow: /
18 | User-agent: AhrefsBot
19 | Disallow: /
20 | User-agent: BLEXBot
21 | Disallow: /
22 | User-agent: dotbot
23 | Disallow: /
24 |
--------------------------------------------------------------------------------
/templates/404.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 | 404: Þessi vefslóð er ekki rétt
17 |
18 |
37 |
38 |
39 |
40 |
41 |
Þessi vefslóð er ekki rétt
42 |
404 Not Found
43 |
44 |
45 |
46 |
47 |
--------------------------------------------------------------------------------
/templates/500.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 | 500: Villa í vefþjóni Greynis
17 |
18 |
37 |
38 |
39 |
40 |
41 |
Villa í vefþjóni Greynis
42 |
500 Server Error
43 |
Beiðnin olli innri villu í vefþjóni Greynis.
44 |
The request caused an internal server error.
45 |
46 |
47 |
48 |
49 |
--------------------------------------------------------------------------------
/templates/articles.html:
--------------------------------------------------------------------------------
1 | {% if articles %}
2 |
3 |
44 | {% else %}
45 |
46 | Engar greinar fundust.
47 |
48 | {% endif %}
--------------------------------------------------------------------------------
/templates/container-fluid.html:
--------------------------------------------------------------------------------
1 | {% extends "container.html" %}
2 |
3 | {% block container %}
4 |
5 |
6 |
7 | {% block content %}
8 | {% endblock -%}
9 |
10 |
11 |
12 | {% endblock -%}
13 |
--------------------------------------------------------------------------------
/templates/container-normal.html:
--------------------------------------------------------------------------------
1 |
2 | {% extends "container.html" %}
3 |
4 |
5 | {% block container %}
6 |
7 |
8 |
9 | {% block content %}
10 | {% endblock -%}
11 |
12 |
13 |
14 | {% endblock -%}
15 |
--------------------------------------------------------------------------------
/templates/hover-infobox.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/templates/parsefail.html:
--------------------------------------------------------------------------------
1 |
2 | {% extends "container-normal.html" %}
3 |
4 | {% block styles %}
5 |
6 |
8 |
9 | {% endblock %}
10 |
11 | {% block content %}
12 |
13 |
14 |
15 |
16 |
17 |
Nýlegar setningar sem ekki tókst að trjágreina
18 |
Nýjustu staðir
19 |
20 |
21 | {{ num }}
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 | {% endblock %}
38 |
39 | {% block endscripts %}
40 |
41 |
42 |
43 |
44 |
55 |
56 | {% endblock %}
--------------------------------------------------------------------------------
/templates/people/timeline.html:
--------------------------------------------------------------------------------
1 |
2 | {% extends "container-normal.html" %}
3 |
4 | {% block styles %}
5 |
6 |
7 |
8 |
20 |
21 |
22 | {% endblock %}
23 |
24 | {% block content %}
25 |
26 |
50 |
51 |
52 |
53 |
54 |
55 | Nafn
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 | {% endblock %}
64 |
65 | {% block endscripts %}
66 |
67 |
70 |
71 |
81 |
82 | {% endblock %}
83 |
84 |
--------------------------------------------------------------------------------
/templates/similar.html:
--------------------------------------------------------------------------------
1 |
2 | {% for sa in similar %}
3 |
4 | {{ sa.ts_text }}
5 |
6 | {{ sa.heading }}
7 | {{ sa.similarity | format_is(1) }}%
8 |
9 | {% endfor %}
10 |
11 |
--------------------------------------------------------------------------------
/templates/words/details.html:
--------------------------------------------------------------------------------
1 | {% for w in words %}
2 |
3 |
12 |
13 | {% for a in w["articles"] %}
14 |
19 | {% endfor %}
20 |
21 |
22 | {% endfor %}
23 |
--------------------------------------------------------------------------------
/templates/words/trends.html:
--------------------------------------------------------------------------------
1 | {% extends "container-normal.html" %}
2 |
3 |
4 | {% block meta %}
5 |
6 | {% endblock %}
7 |
8 |
9 | {% block styles %}
10 |
11 |
12 |
13 | {% endblock %}
14 |
15 | {% block content %}
16 |
17 |
31 |
32 | {% endblock %}
33 |
34 | {% block endscripts %}
35 |
36 | {% endblock %}
37 |
--------------------------------------------------------------------------------
/tests/files/dummy_greynir_api_key.txt:
--------------------------------------------------------------------------------
1 | 123456789
--------------------------------------------------------------------------------
/tests/files/dummy_json_api_key.json:
--------------------------------------------------------------------------------
1 | {
2 | "key": 123456789
3 | }
4 |
--------------------------------------------------------------------------------
/tools/addgender.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | # type: ignore
3 | """
4 | Greynir: Natural language processing for Icelandic
5 |
6 | Utility program to populate the gender column of the persons table
7 |
8 | Copyright (C) 2023 Miðeind ehf.
9 |
10 | This program is free software: you can redistribute it and/or modify
11 | it under the terms of the GNU General Public License as published by
12 | the Free Software Foundation, either version 3 of the License, or
13 | (at your option) any later version.
14 | This program is distributed in the hope that it will be useful,
15 | but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | GNU General Public License for more details.
18 |
19 | You should have received a copy of the GNU General Public License
20 | along with this program. If not, see http://www.gnu.org/licenses/.
21 |
22 |
23 | """
24 |
25 | from settings import Settings, ConfigError
26 | from db import SessionContext
27 | from db.models import Person
28 | from bindb import GreynirBin
29 |
30 | try:
31 | # Read configuration file
32 | Settings.read("config/Greynir.conf")
33 | except ConfigError as e:
34 | print("Configuration error: {0}".format(e))
35 | quit()
36 |
37 | with SessionContext(commit=True) as session, GreynirBin.get_db() as bdb:
38 |
39 | # Iterate through the persons
40 | q = (
41 | session.query(Person)
42 | .filter((Person.gender == None) | (Person.gender == "hk"))
43 | .order_by(Person.name)
44 | .yield_per(200)
45 | )
46 |
47 | lastname = ""
48 |
49 | for p in q:
50 |
51 | p.gender = bdb.lookup_name_gender(p.name)
52 | if p.name != lastname:
53 | print("{0} {1}".format(p.gender, p.name))
54 | lastname = p.name
55 |
--------------------------------------------------------------------------------
/tools/bracket.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 |
3 | import os
4 | import sys
5 |
6 | # Hack to make this Python program executable from the tools subdirectory
7 | basepath, _ = os.path.split(os.path.realpath(__file__))
8 | _UTILS = os.sep + "tools"
9 | if basepath.endswith(_UTILS):
10 | basepath = basepath[0 : -len(_UTILS)]
11 | sys.path.append(basepath)
12 |
13 | from settings import Settings
14 | from db import SessionContext
15 | from tree.util import PgsList, TreeUtility as tu
16 |
17 | Settings.read(os.path.join(basepath, "config", "Greynir.conf"))
18 | Settings.DEBUG = False
19 |
20 | TEXT = "Ég bý í Baugatanga 6. Hér er prófun á þáttun texta."
21 |
22 | pgs: PgsList = []
23 |
24 | with SessionContext(read_only=True) as session:
25 | pgs, stats = tu.parse_text_to_bracket_form(session, TEXT)
26 |
27 | for pg in pgs:
28 | for sent in pg:
29 | print(sent)
30 |
--------------------------------------------------------------------------------
/tools/get_articles_by_url.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 | #
3 | # Given a list of URLs, fetch the corresponding articles
4 | # from the database and write them to a JSON file.
5 | #
6 |
7 | import sys, os, json
8 |
9 | # Look for modules in parent directory
10 | sys.path.insert(1, os.path.join(sys.path[0], ".."))
11 |
12 | from db import SessionContext
13 | from db.models import Article
14 | from tokenizer import correct_spaces
15 |
16 |
17 | def tokens2text(tokens):
18 | """Reassemble text from tokens."""
19 | text = ""
20 | if not tokens:
21 | return text
22 | tokens = json.loads(tokens)
23 | if not tokens:
24 | return text
25 | # Paragraphs
26 | for p in tokens:
27 | tx = ""
28 | # Sentences
29 | for s in p:
30 | # Tokens
31 | for t in s:
32 | tx += t["x"] + " "
33 | tx = correct_spaces(tx)
34 | text += tx + "\n\n"
35 | return text
36 |
37 |
38 | def main():
39 | # Read list of URLs from file
40 | with open("urls.txt", "r") as f:
41 | lines = f.readlines()
42 |
43 | articles = list()
44 |
45 | with SessionContext(read_only=True) as session:
46 | for i in lines:
47 | try:
48 | # Fetch article from database and add to list
49 | url = i
50 | q = (
51 | session.query(
52 | Article.url, Article.timestamp, Article.tokens, Article.heading
53 | )
54 | .filter(Article.url == url)
55 | .all()
56 | )
57 | if len(q) != 1:
58 | continue
59 |
60 | r = q[0]
61 |
62 | item = {
63 | "url": r.url,
64 | "timestamp": r.timestamp.isoformat(),
65 | "title": r.heading,
66 | "text": tokens2text(r.tokens),
67 | }
68 |
69 | articles.append(item)
70 | except Exception as e:
71 | print(f"Error processing {i}: {e}")
72 |
73 | with open("articles.json", "w") as f:
74 | json.dump(articles, f, indent=4, ensure_ascii=False)
75 |
76 |
77 | if __name__ == "__main__":
78 | main()
79 |
--------------------------------------------------------------------------------
/tools/langdetect.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 | # Find all English or Polish articles in the database and print their URLs
3 |
4 | import os
5 | import sys
6 |
7 | # Hack to make this Python program executable from the tools subdirectory
8 | basepath, _ = os.path.split(os.path.realpath(__file__))
9 | _TOOLS = os.sep + "tools"
10 | if basepath.endswith(_TOOLS):
11 | basepath = basepath[0 : -len(_TOOLS)]
12 | sys.path.append(basepath)
13 |
14 | from settings import Settings, ConfigError
15 |
16 | from db import SessionContext
17 | from db.models import Article
18 |
19 | from langdetect import detect as langdetect # type: ignore
20 |
21 | from get_articles_by_url import tokens2text
22 |
23 |
24 | LANG = "en"
25 |
26 |
27 | def main():
28 | try:
29 | # Read configuration file
30 | Settings.read(os.path.join(basepath, "config", "GreynirSimple.conf"))
31 | except ConfigError as e:
32 | print(f"Configuration error: {e}")
33 | quit()
34 |
35 | with SessionContext(commit=True) as session:
36 | q = (
37 | session.query(Article.url, Article.heading, Article.tokens)
38 | # .filter(Article.root_id == 7)
39 | .order_by(Article.timestamp)
40 | )
41 | for r in q:
42 | try:
43 | (url, heading, tokens) = r
44 | text = tokens2text(tokens)
45 | # print(text)
46 | # print("------------------")
47 | headlang = langdetect(heading)
48 | txtlang = langdetect(text)
49 | if headlang == LANG and txtlang == LANG:
50 | print(f"{url}")
51 | except:
52 | pass
53 |
54 |
55 | if __name__ == "__main__":
56 | main()
57 |
--------------------------------------------------------------------------------
/tools/lookup.py:
--------------------------------------------------------------------------------
1 | # type: ignore
2 |
3 | """
4 | Manipulate articles from database
5 | """
6 |
7 |
8 | import datetime
9 | import json
10 | import sys
11 |
12 | import sqlalchemy
13 | import uuid
14 | from sqlalchemy.dialects.postgresql import UUID as psql_UUID
15 |
16 | from db import SessionContext, DataError, desc
17 | from db.models import Article as ArticleRow, Word, Root
18 | from article import Article
19 |
20 |
21 | def gen_sent_text(art):
22 | tokens = json.loads(art.tokens)
23 | idx = 0
24 | for pg in tokens:
25 | for sent in pg:
26 | sent_text = [tok["x"] for tok in sent]
27 | sent_text = " ".join(sent_text)
28 | yield sent_text
29 |
30 |
31 | def get_article_from_id(uid):
32 | with SessionContext(commit=True, read_only=True, session=None) as session:
33 | q = session.query(ArticleRow)
34 | puid = psql_UUID(uid)
35 | arow = q.filter(ArticleRow.id == uid).first()
36 | return Article._init_from_row(arow)
37 |
38 |
39 | def dump_html(uid):
40 | art = get_article_from_id(uid)
41 | print(art.html)
42 |
43 |
44 | def explore(uid):
45 | art = get_article_from_id(uid)
46 | dt = art._scraped
47 | print(dt)
48 | import pdb; pdb.set_trace(); _ = 1 + 1
49 |
50 |
51 | def main(uid, idx):
52 | art = get_article_from_id(uid)
53 | # _idx is zero indexed
54 | context_size = 30
55 | segs = [(_idx + 1, line) for (_idx, line)
56 | in enumerate(gen_sent_text(art))
57 | if abs(idx - (_idx + 1)) < context_size
58 | ]
59 | if not segs:
60 | print("No article found.")
61 | sys.exit(0)
62 | for (it, line) in segs:
63 | if idx == it:
64 | pointer = "-" * len(str(idx))
65 | print(pointer, line, sep="\t")
66 | else:
67 | print(it, line, sep="\t")
68 |
69 |
70 | if __name__ == '__main__':
71 | uid, idx = sys.argv[1:3]
72 | idx = int(idx)
73 | main(uid, idx)
74 | #explore(uid)
75 |
76 |
77 |
--------------------------------------------------------------------------------
/tools/missing_nouns.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 |
3 | """
4 | Read tokens of all articles in the database, look for nouns
5 | and check if they can be found in vocabulary. If not,
6 | add them to a dictionary and spit it out.
7 | """
8 |
9 | import json, sys, os
10 | from datetime import datetime, timezone
11 | from collections import defaultdict
12 | from pprint import pprint
13 | from typing import Dict
14 |
15 | # Look for modules in parent directory
16 | sys.path.insert(1, os.path.join(sys.path[0], ".."))
17 |
18 | from db import SessionContext
19 | from db.models import Article
20 |
21 | with SessionContext(read_only=True) as session:
22 | q = (
23 | session.query(Article.id, Article.timestamp, Article.tokens) # type: ignore
24 | .filter(Article.tree != None)
25 | .filter(Article.timestamp != None)
26 | .filter(Article.timestamp <= datetime.now(timezone.utc)) # type: ignore
27 | .filter(Article.heading > "") # type: ignore
28 | .filter(Article.num_sentences > 0) # type: ignore
29 | )
30 |
31 | nouns: Dict[str, int] = defaultdict(int)
32 |
33 | for i, a in enumerate(q.yield_per(100)):
34 | print("%d\r" % i, end="")
35 | if not a.tokens:
36 | continue
37 | tokens = json.loads(a.tokens)
38 | # Paragraphs
39 | for p in tokens:
40 | # Sentences
41 | for s in p:
42 | # Tokens
43 | for t in s:
44 | if (
45 | "t" in t
46 | and t["t"].startswith("no_")
47 | and not t.get("m")
48 | and not t.get("v")
49 | ):
50 | # print(t["x"])
51 | # print(t)
52 | nouns[t["x"]] += 1
53 |
54 | ordered = sorted(nouns.items(), key=lambda kv: kv[1])
55 |
56 | pprint(ordered)
57 |
--------------------------------------------------------------------------------
/tools/orn.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | """
3 |
4 | Fetch all Icelandic placenames (örnefni) from iceaddr database
5 | and try to look them up using GreynirEngine's bindb module.
6 | Print any placenames that could not be found in either
7 | BÍN proper or using the word combinator (samsetjari).
8 |
9 | """
10 |
11 | import sys
12 | import sqlite3
13 |
14 | from reynir.bindb import GreynirBin
15 |
16 | if __name__ == "__main__":
17 | """Invocation via command line."""
18 | db_path = sys.argv[1] if len(sys.argv) > 1 else None
19 | if not db_path:
20 | print("No db path")
21 | sys.exit(1)
22 |
23 | db_conn = sqlite3.connect(db_path, check_same_thread=False)
24 | db_conn.row_factory = lambda c, r: dict(zip([col[0] for col in c.description], r))
25 |
26 | q = "SELECT DISTINCT nafn FROM ornefni;"
27 |
28 | res = db_conn.cursor().execute(q)
29 |
30 | matches = [row["nafn"] for row in res]
31 |
32 | num_bin = 0
33 | num_comb = 0
34 | num_fail = 0
35 |
36 | with GreynirBin.get_db() as db:
37 | for m in matches:
38 | w = m.strip()
39 | if " " in w or "-" in w or "-" in w:
40 | continue
41 |
42 | # Direct BÍN lookup
43 | meanings = db.meanings(w)
44 | if meanings:
45 | num_bin += 1
46 | continue
47 |
48 | # Lookup using BÍN and combinator
49 | _, meanings = db.lookup_g(w, auto_uppercase=True)
50 | if meanings:
51 | num_comb += 1
52 | continue
53 |
54 | print(w)
55 | num_fail += 1
56 |
57 | print("Num BÍN: {0}".format(num_bin))
58 | print("Num comb: {0}".format(num_comb))
59 | print("Num fail: {0}".format(num_fail))
60 |
--------------------------------------------------------------------------------
/tools/qinfo.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 | #
3 | # This program reads all logged queries in the database and dumps
4 | # various stats wrt. unanswered queries + more.
5 |
6 | import os
7 | import sys
8 |
9 | # Hack to make this Python program executable from the tools subdirectory
10 | basepath, _ = os.path.split(os.path.realpath(__file__))
11 | _TOOLS = os.sep + "tools"
12 | if basepath.endswith(_TOOLS):
13 | basepath = basepath[0 : -len(_TOOLS)]
14 | sys.path.append(basepath)
15 |
16 | from collections import Counter
17 | from pprint import pprint
18 |
19 | from db import SessionContext
20 | from db.models import QueryLog
21 | from queries.special import _SPECIAL_QUERIES
22 |
23 | from Levenshtein import StringMatcher # type: ignore
24 |
25 |
26 | _MAX_DISTANCE = 5
27 | _MIN_QUERY_LEN = 10
28 |
29 |
30 | def main() -> None:
31 | uniq = set()
32 | special = _SPECIAL_QUERIES.keys()
33 |
34 | # Read all logged queries from database
35 | with SessionContext(read_only=True) as session:
36 | counter = Counter()
37 |
38 | ql = session.query(QueryLog).filter(QueryLog.answer == None)
39 | for q in ql:
40 | question = q.question
41 | # if (
42 | # len(question) < _MIN_QUERY_LEN
43 | # or (question in uniq)
44 | # or (question in special)
45 | # ):
46 | # continue
47 | # print(question)
48 | counter[question] += 1
49 | continue
50 | # print(q.question)
51 | uniq.add(question)
52 | # Run levenshtein comparison against every hardcoded special query
53 | for s in special:
54 | matcher = StringMatcher.StringMatcher(seq1=question, seq2=s)
55 | d = matcher.distance()
56 | # print(d)
57 | # if d <= _MAX_DISTANCE:
58 | print(f"{d} '{q.question}' ~ '{s}'")
59 | pprint(counter)
60 |
61 |
62 | if __name__ == "__main__":
63 | main()
64 |
--------------------------------------------------------------------------------
/tools/qlog_copy.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | """
3 |
4 | Greynir: Natural language processing for Icelandic
5 |
6 | Copyright (C) 2023 Miðeind ehf.
7 |
8 | This program is free software: you can redistribute it and/or modify
9 | it under the terms of the GNU General Public License as published by
10 | the Free Software Foundation, either version 3 of the License, or
11 | (at your option) any later version.
12 | This program is distributed in the hope that it will be useful,
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | GNU General Public License for more details.
16 |
17 | You should have received a copy of the GNU General Public License
18 | along with this program. If not, see http://www.gnu.org/licenses/.
19 |
20 |
21 | Copy all logged Queries to anonymised QueryLog table.
22 |
23 | """
24 |
25 | import os
26 | import sys
27 |
28 | # Hack to make this Python program executable from the tools subdirectory
29 | basepath, _ = os.path.split(os.path.realpath(__file__))
30 | _TOOLS = os.sep + "tools"
31 | if basepath.endswith(_TOOLS):
32 | basepath = basepath[0 : -len(_TOOLS)]
33 | sys.path.append(basepath)
34 |
35 | from settings import Settings, ConfigError
36 | from db import SessionContext
37 | from db.models import Query, QueryLog
38 |
39 |
40 | def main():
41 |
42 | try:
43 | # Read configuration file
44 | Settings.read(os.path.join(basepath, "config", "GreynirSimple.conf"))
45 | except ConfigError as e:
46 | print("Configuration error: {0}".format(e))
47 | quit()
48 |
49 | with SessionContext(commit=True) as session:
50 | i = 0
51 | for q in session.query(Query).all():
52 | ql: QueryLog = QueryLog.from_Query(q)
53 | session.add(ql)
54 | i += 1
55 | if i % 1000 == 0:
56 | session.commit()
57 | session.commit()
58 |
59 |
60 | if __name__ == "__main__":
61 | main()
62 |
--------------------------------------------------------------------------------
/tools/showprofile.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 |
3 | """ Utility to quickly display profiling information """
4 |
5 | import pstats
6 |
7 | stats = pstats.Stats("Reynir.profile")
8 |
9 | # Clean up filenames for the report
10 | stats.strip_dirs()
11 |
12 | # Sort the statistics by the cumulative time spent in a function
13 | #stats.sort_stats('tottime')
14 | stats.sort_stats('cumtime')
15 |
16 | stats.print_stats(100) # Print 100 most significant lines
17 |
18 |
--------------------------------------------------------------------------------
/tools/specialqmod_fix.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 | #
3 | # This program examines hardcoded queries in the special.py
4 | # query module and checks if they can be improved.
5 |
6 | import os
7 | import sys
8 |
9 | # Hack to make this Python program executable from the tools subdirectory
10 | basepath, _ = os.path.split(os.path.realpath(__file__))
11 | _TOOLS = os.sep + "tools"
12 | if basepath.endswith(_TOOLS):
13 | basepath = basepath[0 : -len(_TOOLS)]
14 | sys.path.append(basepath)
15 |
16 | from queries.special import _SPECIAL_QUERIES
17 |
18 | _VERBS = {
19 | "geturðu": "getur þú",
20 | "viltu": "vilt þú",
21 | "helduru": "heldur þú",
22 | "kanntu": "kannt þú",
23 | "ertu": "ert þú",
24 | # "farðu": "far þú",
25 | "þekkirðu": "þekkir þú",
26 | "skilurðu": "skilur þú",
27 | "talarðu": "talar þú",
28 | }
29 |
30 |
31 | def main() -> None:
32 | special = _SPECIAL_QUERIES.keys()
33 |
34 | for s in special:
35 | for k, v in _VERBS.items():
36 | if s.startswith(k):
37 | i = s.replace(k, v)
38 | if i not in special:
39 | print(s + " --> " + i)
40 |
41 |
42 | if __name__ == "__main__":
43 | main()
--------------------------------------------------------------------------------
/tools/splitcopper.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 |
3 | # type: ignore
4 |
5 | SEPARATOR = "\n\n"
6 |
7 | accumulated = ""
8 | treecnt = 0
9 | limit = 1000000
10 | f = "bit"
11 | affix = 0
12 | suff = ".txt"
13 |
14 | def gen_chunks(file):
15 | while True:
16 | data = file.read(1024)
17 | if not data:
18 | break
19 | yield data
20 |
21 |
22 | for line in open("copper.txt"):
23 | if not line: # Empty line between trees
24 | treecnt +=1
25 | if treecnt % 500 == 0:
26 | print(f"{treecnt} sentences read")
27 | outfile = f + affix + suff
28 | with open(outfile, 'w') as chunk:
29 | chunk.write(accumulated)
30 | accumulated = ""
31 | if treecnt >= limit:
32 | limit += 1000000
33 | affix +=1
34 |
35 | accumulated += line
36 | print(treecnt)
37 |
--------------------------------------------------------------------------------
/tts.py:
--------------------------------------------------------------------------------
1 | """
2 |
3 | Greynir: Natural language processing for Icelandic
4 |
5 | Copyright (C) 2023 Miðeind ehf.
6 |
7 | This program is free software: you can redistribute it and/or modify
8 | it under the terms of the GNU General Public License as published by
9 | the Free Software Foundation, either version 3 of the License, or
10 | (at your option) any later version.
11 | This program is distributed in the hope that it will be useful,
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | GNU General Public License for more details.
15 |
16 | You should have received a copy of the GNU General Public License
17 | along with this program. If not, see http://www.gnu.org/licenses/.
18 |
19 |
20 | Utility functions used in various places in the codebase.
21 |
22 | """
23 |
24 | DEFAULT_LOCALE = "is_IS"
25 |
26 | # Map locales to a default voice ID
27 | LOCALE_TO_VOICE_ID = {
28 | "is_IS": "Gudrun",
29 | "en_US": "Jenny",
30 | "en_GB": "Abbi",
31 | "de_DE": "Amala",
32 | "fr_FR": "Brigitte",
33 | "da_DK": "Christel",
34 | "sv_SE": "Sofie",
35 | "nb_NO": "Finn",
36 | "no_NO": "Finn",
37 | "es_ES": "Abril",
38 | "pl_PL": "Agnieszka",
39 | }
40 | assert DEFAULT_LOCALE in LOCALE_TO_VOICE_ID
41 |
42 |
43 | def voice_for_locale(locale: str) -> str:
44 | """Returns default voice ID for the given locale. If locale is not
45 | supported, returns the default voice ID for the default locale."""
46 | vid = LOCALE_TO_VOICE_ID.get(locale)
47 | return vid or LOCALE_TO_VOICE_ID[DEFAULT_LOCALE]
48 |
--------------------------------------------------------------------------------
/vectors/README.md:
--------------------------------------------------------------------------------
1 |
2 | # Vectors directory
3 |
4 | ## Text similarity functionality of Greynir
5 |
6 | This directory contains most of the text similarity
7 | functionality of Greynir. This functionality allows topic
8 | vectors (lists of 200 floats) to be calculated, e.g. for articles,
9 | word lists and search terms. The topic vectors can then be
10 | compared, for instance with cosine similarity, to determine
11 | how closely related the associated texts are.
12 |
13 | This code uses Radim Rehurek's
14 | [Gensim](https://radimrehurek.com/gensim/auto_examples/index.html).
15 | The link points to a highly recommended tutorial on
16 | topic models, TF-IDF and LSI.
17 |
18 | ### Setup
19 |
20 | In addition to the files found here in this repository,
21 | you will need the following:
22 |
23 | * A CPython >=3.7 virtualenv within the `vectors` folder, typically
24 | called `venv`. (PyPy presently doesn't support
25 | `numpy` and `gensim` adequately for this purpose,
26 | so CPython is required.)
27 |
28 | * Within the venv, you need to `pip install -r requirements.txt`
29 |
30 | * You also need soft links to the following files and directories
31 | from the parent Greynir directory:
32 |
33 | ```bash
34 | ln -s ../db .
35 | ln -s ../settings.py .
36 | ln -s ../similar.py .
37 | ```
38 |
39 | After this is all set up, you can select your venv and use
40 | `builder.py` to access the text similarity functionality:
41 |
42 | ```bash
43 | source venv/bin/activate
44 | python builder.py --help
45 | ```
46 |
47 | To rebuild a dictionary and TF-IDF and LSI models from your
48 | text corpus (by default coming from the `articles` database table
49 | in the PostgreSQL database `scraper`):
50 |
51 | ```bash
52 | python builder.py model
53 | ```
54 |
55 | To generate topic vectors for the topics in the `Topics.conf` file,
56 | and store them in the database `topics` table, invoke:
57 |
58 | ```bash
59 | python builder.py topics
60 | ```
61 |
62 |
--------------------------------------------------------------------------------
/vectors/Vectors.conf:
--------------------------------------------------------------------------------
1 | #
2 | # Vectors.conf
3 | #
4 | # Configuration file for Greynir (vectors subsystem)
5 | #
6 | # Copyright (C) 2023 Miðeind ehf.
7 | #
8 | # This program is free software: you can redistribute it and/or modify
9 | # it under the terms of the GNU General Public License as published by
10 | # the Free Software Foundation, either version 3 of the License, or
11 | # (at your option) any later version.
12 | #
13 | # This program is distributed in the hope that it will be useful,
14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | # GNU General Public License for more details.
17 | #
18 | # You should have received a copy of the GNU General Public License
19 | # along with this program. If not, see http://www.gnu.org/licenses/.
20 | #
21 |
22 | [settings]
23 |
24 | # db_hostname is 'localhost' by default, but can also be overridden
25 | # by setting the GREYNIR_DB_HOST environment variable
26 | # db_hostname = localhost
27 |
28 | # db_port is '5432' by default, but can also be overridden
29 | # by setting the GREYNIR_DB_PORT environment variable
30 | # db_port = 5432
31 |
32 | debug = true
33 |
34 | host = 0.0.0.0
35 |
36 | # Word indexing specifications
37 |
38 | $include Index.conf
39 |
40 | # Specification of topics
41 |
42 | $include Topics.conf
43 |
--------------------------------------------------------------------------------
/vectors/requirements.txt:
--------------------------------------------------------------------------------
1 | cffi==1.14.0
2 | gensim==3.8.2
3 | psycopg2cffi==2.8.1
4 | pycparser==2.20
5 | SQLAlchemy==1.4.0
6 | typing_extensions>=3.10.0
7 |
--------------------------------------------------------------------------------