Skip to content

corpus.common.provinces() with details option #467

@bact

Description

@bact

Add details= option for corpus.common.provinces(), to return romanized and abbreviated names of the provinces in Thailand.

Use data from pythainlp/corpus/thailand_provinces_th.csv

If details=False

  • return frozenset
  • members are names of provinces in Thailand, in Thai language
  • no order (as it is a set)

If details=True

  • return list
  • members are dict with these fields
    • name_th - full name in Thai
    • abbr_th - abbreviated name in Thai
    • name_en - full name, romanized ("English")
    • abbr_en - abbreviated name, from the romanized name
  • ordered by the original order in pythainlp/corpus/thailand_provinces_th.csv

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementenhance functionalities

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions