I'm Yuki Yotsumoto. This is the README markdown for the AI Lab course at the University of Helsinki ๐ซ๐ฎ in 2025.
Last modified: 27.04.2025
and https://www.wordfrequency.info/ as the dictionary file [5].
After cloning my repository on your machine, launch Poetry at the root directory of the installed project. To implement this, you have to install Poetry in advance. Finish the initialization of the project by running the command:
poetry install
When executing the command, you might be led to the following notification:
Installing the current project: poetry-testi (0.1.0)
The current project could not be installed: [Errno 2] No such file or directory: '~/poetry-testi/README.md'
If you do not want to install the current project use --no-root
This is because Poetry is also trying to install (some) existing projects here. When you want to install only project dependencies, use this:
poetry install --no-root
My App uses 'CustomTkinter' library which is made based on UI-library 'Tkinter', which helps the project generate UI. So execute the command below to use my project (after moving to the root directory):
poetry add --dev customtkinter
And you will get the notification:
Updating dependencies
Resolving dependencies... (0.6s)
Package operations: 3 installs, 0 updates, 0 removals
- Installing darkdetect (0.8.0)
- Installing packaging (24.2)
- Installing customtkinter (5.2.2)
Writing lock file
This is finally completion of installing. How to use this? It is explained on the page.
My application uses 'tkinter' library which help the project generate GUI. So execute the command below to use my project:
brew install python-tk
You will get the answer like the following one:
==> Auto-updating Homebrew...
Adjust how often this is run with HOMEBREW_AUTO_UPDATE_SECS or disable with
HOMEBREW_NO_AUTO_UPDATE. Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
==> Auto-updated Homebrew!
Updated 2 taps (homebrew/core and homebrew/cask).
==> New Formulae
acme.sh sdl3
.
.
.
==> Downloading https://ghcr.io/v2/homebrew/core/tcl-t
Already downloaded: /Users/takumi/Library/Caches/Homebrew/downloads/be646597f3d79273593a6a054e9ad1fcc722de45fe4be5464b2a5275f8b7303b--tcl-tk-9.0.1-1.bottle_manifest.json
==> Pouring tcl-tk--9.0.1.arm64_sequoia.bottle.1.tar.g
๐บ /opt/homebrew/Cellar/tcl-tk/9.0.1: 3,150 files, 38MB
==> Installing python-tk@3.13
==> Pouring python-tk@3.13--3.13.1.arm64_sequoia.bottl
๐บ /opt/homebrew/Cellar/python-tk@3.13/3.13.1: 6 files, 160.5KB
==> Running `brew cleanup python-tk@3.13`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
Move to the directory named 'GRASP' with cd command and Start the application with the command:
poetry run python __main__.py
The new window (my project's App) appears.
To update (generate lock file):
poetry add requests
If you have not installed coverage, use the command:
poetry add --dev coverage
Move to 'tests' directory and Execute coverage test:
poetry run coverage run test_core.py
And then, you will get the report using:
poetry run coverage report
For example;
takumi@takuminoMacBook-Pro tests % poetry run coverage report
Name Stmts Miss Cover
------------------------------------------------------------------------------
/Users/takumi/Documents/GitHub/UHAILab/GRASP/__init__.py 0 0 100%
/Users/takumi/Documents/GitHub/UHAILab/GRASP/config.py 6 0 100%
/Users/takumi/Documents/GitHub/UHAILab/GRASP/core.py 139 2 99%
test_prime.py 147 0 100%
------------------------------------------------------------------------------
TOTAL 292 2 99%
All the documents are stored in the same directory named "Documentation".
All the files should not be changed for stable implementing.
UHAILab/
โโฃโโโโ README.md (this file)
โโฃโโโโ ver2_vocabulary.csv
โโฃโโโโ user_defined.csv
โโฃโโณโโ GRASP/
โโโโฃโโโโ __init__.py
โโโโฃโโโโ config.py
โโโโฃโโโโ core.py
โโโโฃโโโโ ui.py
โโโโฃโโโโ unrestricted_damerau_levenshtein.c
โโโโฃโโโโ libunrestricted.dylib
โโโโโโโโ __main__.py
โโฃโโณโโ Data/
โโโโฃโโโโ text_general.txt
โโโโฃโโโโ text_technical.txt
โโโโฃโโโโ text_slang.txt
โโโโฃโโโโ text_noise.txt
โโโโฃโโโโ correctly_general.txt
โโโโฃโโโโ correctly_technical.txt
โโโโฃโโโโ correctly_slang.txt
โโโโโโโโ correctly_noise.txt
โโฃโโณโโ Tests/
โโโโฃโโโโ __init__.py
โโโโฃโโโโ test_core.py
โโโโฃโโโโ libunrestricted.dylib
โโโโโโโโ test_user_corrections.csv
โโโโณโโ Documentation/
โโโโฃโโโโ implementation.md
โโโโฃโโโโ specification.md
โโโโฃโโโโ userguide.md
โโโโฃโโโโ testing_report.md
โโโโฃโโโโ week1report.md
โโโโฃโโโโ week2report.md
โโโโฃโโโโ week3report.md
โโโโฃโโโโ week4report.md
โโโโฃโโโโ week5report.md
โโโโโโโโ week6report.md
It is used as the vocabulary to compare target words with rightly-spelled words.
The newer Poetry should be maintained by Homebrew. So you cannot use:
poetry shell
The command "shell" does not exist.
I have not tried this, but just in case.
First, install plugin:
poetry self add poetry-plugin-shell
But you might receieve error. If so, the cause should be 'The shell command was moved to a plugin: poetry-plugin-shell, Poetry official page said [4].
You can install poetry with pip to solve this error, you should not use pip though according to the course page.
Varoitus: pip Olet saattanut asentaa Pythonin tarvitsemia riippuvuuksia pip-komennolla. รlรค kรคytรค pipiรค tรคllรค kurssilla sillรค jos teet niin, teet 99.9% todennรคkรถisyydellรค jotain vรครคrin.
Where and What is the function named "connectiontest"?
It is used only for confirming the stable connection between files placed at some different folders. "connectiontest" is (or used to be) set in "__main__.py".
When I make this README file, I refer to shun198's article. Thanks to shun198 [1] [2].
And I think of the structure of this project, I refer to sari-bee's repository[3] which seems to have been made in the same course.
I have changed the vocabulary file into Word frequency Top 5000's file to check if words are correctly-spelled. You can get access with the link [5].
[1] https://qiita.com/shun198/items/c983c713452c041ef787
[2] https://github.com/shun198
[3] https://github.com/sari-bee/tieteellinen_laskin?tab=readme-ov-file
[4] https://python-poetry.org/docs/cli/#script-project
[5] https://www.wordfrequency.info/