Skip to content

Conversation

@oree-xx
Copy link
Contributor

@oree-xx oree-xx commented Nov 5, 2025

Fixes

Description

Added python scripts for processing and reporting wikipedia data.
Covered analysis around top 10 highest language usage, classification of represented and underrepresented languages, average count of article per language and percentage of all Wikipedia articles that belong to the top 10 languages.

Checklist

  • I have read and understood the Developer Certificate of Origin (DCO), below, which covers the contents of this pull request (PR).
  • My pull request doesn't include code or content generated with AI.
  • My pull request has a descriptive title (not a vague title like Update index.md).
  • My pull request targets the default branch of the repository (main or master).
  • My commit messages follow best practices.
  • My code follows the established code style of the repository.
  • I added or updated tests for the changes I made (if applicable).
  • I added or updated documentation (if applicable).
  • I tried running the project locally and verified that there are no
    visible errors.

Developer Certificate of Origin

For the purposes of this DCO, "license" is equivalent to "license or public domain dedication," and "open source license" is equivalent to "open content license or public domain dedication."

Developer Certificate of Origin
Developer Certificate of Origin
Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.


Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.

@oree-xx oree-xx requested review from a team as code owners November 5, 2025 16:09
@oree-xx oree-xx requested review from TimidRobot and possumbilities and removed request for a team November 5, 2025 16:09
@oree-xx
Copy link
Contributor Author

oree-xx commented Nov 5, 2025

@TimidRobot I am considering classifying the languages by regions. Would that be quite meaningful?

@cc-open-source-bot cc-open-source-bot moved this to In review in TimidRobot Nov 5, 2025
@TimidRobot TimidRobot self-assigned this Nov 6, 2025
@TimidRobot
Copy link
Member

TimidRobot commented Nov 6, 2025

@TimidRobot I am considering classifying the languages by regions. Would that be quite meaningful?

Please provide more information on what the API provides regarding regions

Rather, the data file doesn't have any region information. The processing phase shouldn't fetch any additional information. If there is region data, the fetch script needs to be updated. Though, given the various diasporas, I'm skeptical that region information is helpful.

@oree-xx
Copy link
Contributor Author

oree-xx commented Nov 6, 2025

@TimidRobot I am considering classifying the languages by regions. Would that be quite meaningful?

Please provide more information on what the API provides regarding regions

Rather, the data file doesn't have any region information. The processing phase shouldn't fetch any additional information. If there is region data, the fetch script needs to be updated. Though, given the various diasporas, I'm skeptical that region information is helpful.

Ohh okay.

@TimidRobot
Copy link
Member

I also think think you should update and reorder plots:

  1. "Language representation" (renamed to use Sentence case)
  2. "Most represented languages" (rename from "Top 10 Highest Language Usage")
  3. "Least represented languages" (new, be sure to note that it only includes languages with at least 1 article)

@TimidRobot
Copy link
Member

TimidRobot commented Nov 14, 2025

We use sentence case for titles and headings because we generally follow the Google developer documentation style guide.

Capitalization in titles and headings  |  Capitalization  |  Google developer documentation style guide  |  Google for Developers:

In document titles and headings, use sentence case. That is, capitalize only the first word in the title, the first word in a subheading after a colon, and any proper nouns or other terms that are always capitalized a certain way.

Even though you're using sentence case, don't put a period at the end of a title or heading.

Sentence case improves readability and allows consistent capitalization (otherwise knowing which words to capitalize can become quite hard to remember).

See also: Documentation Guidelines — Creative Commons Open Source

import sys
import traceback

# Third-party
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update this script to match established scripts:

from pygments import highlight
from pygments.formatters import TerminalFormatter
from pygments.lexers import PythonTracebackLexer

...

Comment on lines 180 to 182
except Exception:
LOGGER.exception(f"(1) Unhandled exception: {traceback.format_exc()}")
sys.exit(1)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update to match established scripts:

    except Exception:
        traceback_formatted = textwrap.indent(
            highlight(
                traceback.format_exc(),
                PythonTracebackLexer(),
                TerminalFormatter(),
            ),
            "    ",
        )
        LOGGER.critical(f"(1) Unhandled exception:\n{traceback_formatted}")
        sys.exit(1)

Comment on lines 174 to 176
except SystemExit as e:
LOGGER.error(f"System exit with code: {e.code}")
sys.exit(e.code)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update to match established scripts:

    except SystemExit as e:
        if e.code != 0:
            LOGGER.error(f"System exit with code: {e.code}")
        sys.exit(e.code)

Comment on lines 118 to 120
Processing count data: language representation
"""
LOGGER.info(process_language_representation.__doc__.strip())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the other log messages, the first word after the colon is capitalized. I think language should be capitalized here (Language).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ohh okay.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

Add Wikipedia processing and reporting

2 participants