2024-12-06 18:46:27 +00:00
|
|
|
all: ensure_env build sync clean export_dataset export_stats merge_images export_statistics export_mentions
|
2024-11-25 19:47:34 +00:00
|
|
|
|
|
|
|
ensure_env:
|
|
|
|
-@python3 -m venv venv
|
2024-11-23 18:56:52 +00:00
|
|
|
|
|
|
|
build:
|
2024-11-25 19:50:20 +00:00
|
|
|
./venv/bin/python -m pip install build
|
|
|
|
./venv/bin/python -m build .
|
|
|
|
./venv/bin/python -m pip install -e .
|
2024-11-23 18:56:52 +00:00
|
|
|
|
|
|
|
sync:
|
2024-11-25 19:15:31 +00:00
|
|
|
./venv/bin/dr.sync
|
2024-11-23 18:56:52 +00:00
|
|
|
|
2024-11-23 19:07:19 +00:00
|
|
|
clean:
|
|
|
|
-@rm -r export
|
|
|
|
mkdir -p export
|
|
|
|
|
2024-11-23 18:56:52 +00:00
|
|
|
export_stats:
|
2024-11-23 18:56:52 +00:00
|
|
|
@echo "Make sure you have ran 'make sync' first. Results will be in ./export/"
|
2024-11-26 17:15:45 +00:00
|
|
|
@echo "Exporting statistics."
|
2024-11-26 08:28:21 +00:00
|
|
|
./venv/bin/dr.stats
|
2024-11-23 18:56:52 +00:00
|
|
|
|
2024-11-23 18:56:52 +00:00
|
|
|
export_dataset:
|
2024-11-23 18:56:52 +00:00
|
|
|
@echo "Make sure you have ran 'make sync' first."
|
|
|
|
@echo "Exporting dataset to be used for LLM embedding. Result will be ./export/0_dataset.txt"
|
2024-11-25 19:15:31 +00:00
|
|
|
./venv/bin/dr.dataset > export/0_dataset.txt
|
2024-11-23 18:56:52 +00:00
|
|
|
|
2024-11-24 06:09:50 +00:00
|
|
|
export_statistics:
|
|
|
|
@echo "Exporting statisticts. Result will be ./export/2_statistics.txt"
|
2024-12-06 22:01:01 +00:00
|
|
|
cat export/0_dataset.txt | grep "Statistics: "
|
|
|
|
cat export/0_dataset.txt | grep "Statistics: " > export/2_statistics.txt
|
2024-11-24 06:09:50 +00:00
|
|
|
|
|
|
|
|
|
|
|
export_mentions:
|
|
|
|
@echo "Exporting mentions. Result will be ./export/3_mentions.txt"
|
2024-12-06 22:01:01 +00:00
|
|
|
cat export/0_dataset.txt | grep "times ment"
|
|
|
|
cat export/0_dataset.txt | grep "times ment" > export/3_mentions.txt
|
2024-11-24 06:09:50 +00:00
|
|
|
|
|
|
|
|
2024-11-23 18:56:52 +00:00
|
|
|
merge_images:
|
|
|
|
@echo "Merging images to one big image. Result will be ./export/1_graphs_compliation.png."
|
2024-11-25 19:15:31 +00:00
|
|
|
./venv/bin/python merge_images.py
|
2024-11-24 06:09:50 +00:00
|
|
|
|
|
|
|
|