frwiktionary / README.md
cargilcm's picture
Update README.md
592c31f verified
metadata
license: mit
language:
  - en
  - fr
tags:
  - code
pretty_name: frwiktionary-20230501-pam-pcre_parsed.db
size_categories:
  - 10K<n<100K

open database:

$: sqlite3 frwiktionary-20230501-pages-articles-multistream.xml-pcre_parsed.db

see create table schema

sqlite > .schema joined_trans:

CREATE TABLE `joined_trans` (
`id` integer NOT NULL
, `page_id` integer DEFAULT NULL
, `page_title` varchar(255) DEFAULT NULL
, `rev_id` integer DEFAULT NULL
, `rev_page` integer DEFAULT NULL
, `old_id` integer DEFAULT NULL
, `text_transd` varchar(1255) DEFAULT NULL
);

Num rows:

2,281,460 or more accurately: select count(*) from joined_trans where `text_transd` != 'NULL';:

    37010*

*this number which is significantly smaller than an English dictionary which usually has ~>60k words but accounts for the deficiency in words assigned a translation text on the French Wiktionary as described in the paper and it's referenced papers (download from sci-hib.ee to avoid paywall )

Garbled text or query returns no result

from a lesson learned, when i imported the Wiktionary data, i used phpmyadmin which on my system had a default collation setting of 'latin_swedish_ci' so to make this demo/data match what's truly in the Wiktionary I'd have to see what the special characters from Wiktionary were mapped to in swedish_ci and replace those strings in my table with their actual special characters after setting collation to utf. More optimally, i could run thru the whole process again from scratch with the correct collation, but why forego the headaches of sorting out utf quirks, parity withstanding ;)

Example query

SELECT * FROM train WHERE page_title = '├¬tre' LIMIT 100; [query to view être due to utf/latin_swedish_ci garbling]

I foresee as likely my giving a go at reversing the garbling by string replacing all the erroneous special characters on or before June 1,2026 but as I'm a Dad such types of plans are liable to be derailed; that's my disclaimer but I've dragged my feet publishing this data since i completed it in 2023-2024 and the paper was completed in 2016 so i shall hasten to yield such final product