Example #1
0
def task_cns_core_stat(args=None):
    name = "cns-core"
    version = "3.2"

    items = read_cns_core_excel(version, path="data")

    #logging.info(items)
    stat(items, [
        "wikidataUrl", "wikidataName", "wikipediaUrl", "nameZh",
        "descriptionZh"
    ])
    dup(items, "wikidataName")
    dup(items, "wikidataUrl")
    dup(items, "wikipediaUrl")
Example #2
0
def task_cns_core_excel2json(args=None):
    name = "cns-core"
    version = cns_config["version"]

    items = read_cns_core_excel(version, path="data")

    #logging.info(items)
    stat(items, [
        "wikidataUrl", "wikidataName", "wikipediaUrl", "nameZh",
        "descriptionZh"
    ])
    dup(items, "wikidataName")
    dup(items, "wikidataUrl")
    dup(items, "wikipediaUrl")

    write_cns_core(items, version, formats=["jsonld"])
Example #3
0
def task_init(args=None):
    so = Schemaorg("3.2")
    data = so.load_data()
    stat(data.values(), [], ["_group", "@type"])
    logging.info(len(data))