Git Product home page Git Product logo

named-entities-for-premodern-chinese-history-research's People

Contributors

merakdipper avatar sudoghut avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

named-entities-for-premodern-chinese-history-research's Issues

Work plan for the addresses

1. Data source table: ADDR_CODES

2. Data source fields: ADDR_CODES.c_name_chn, ADDR_CODES.c_alt_names

3. Output schema: addr_chn

4. How to create office_chn for the output:

ADDR_CODES.c_name_chn + ADDR_CODES.c_alt_names => addr_chn

5. Clean data rules:

  • Remove one character addresses

  • Remove the addresses which contain any English letters, any sort of brackets, or "、"

  • Replace " " by ""

6. Address type list:

備禦左千戶所
備禦後千戶所
備禦前千戶所
備禦右千戶所
都團練觀察使
沿邊第一區
沿邊第二區
沿邊第三區
沿邊第四區
沿邊第五區
沿邊第六區
沿邊第七區
沿邊第八區
沿邊第九區
沿邊第十區
守禦千戶所
軍民千戶所
中前千戶所
中左千戶所
中右千戶所
中後千戶所
左右千戶所
備禦千戶所
群牧千戶所
行政督查區
特別行政區
副都統轄區
團練觀察使
防御觀察使
觀察防遏使
軍民總管府
江防兵備道
都團練觀察
前千戶所
左千戶所
右千戶所
省諸道區
將軍轄區
都防御使
行中書省
封國封郡
廉訪司道
團練觀察
防御觀察
觀察防遏
右屯衛
中屯衛
後屯衛
前屯衛
右護衛
左護衛
中護衛
長官司
揮使司
安撫司
儀衛司
宣慰司
慰使司
布政司
宣撫司
群牧所
市轄區
綏靖區
特別區
行政區
節度使
觀察使
團練使
防御使
處置使
經略使
守捉使
道行軍
鎮守軍
直隸廳
自治縣
都督府
總管府
都護府
總帥府
自治州
羈縻州
兵備道
監軍道
監察道
分巡道
分守道
都防御
千戶所
百戶所
五衛
右衛
左衛
中衛
前衛
護衛
節度
地區
特區
郊區
東路
西路
南路
北路
府路
中旗
前旗
後旗
右旗
左旗
分縣
土縣
等處
王府
西道
東道
諸道
中道
節度
觀察
團練
防御
經略
守捉








使






Actions:

  • Save all the addresses after 5. Clean data rules to the output list first
  • Remove the address types in the address list by the address type list (from the right end)
  • Discard the records which the length of the rest of address <2
  • Save the addresses which length(before)>length(after) to the output list
  • Discard the records which don't contain the address types
  • Loop the actions above till the list is empty
  1. Remove the duplicate records and sort it by descending order of the length

  2. Separate the addresses of c_alt_names by ";". This should be done before step 5.

Work plan for the entries

  1. Data source table: ENTRY_CODES.

  2. Data source fields: ENTRY_CODES.c_entry_desc_chn.

  3. Output schema (One columns): entry_chn.

  4. Data for Special Rules:
    [Missing Data] - remove
    未知 - remove
    臨時保留,待考。 - remove
    待刪除(内容多種,未知所屬,故臨時保留)。 - remove
    科舉: 正奏名諸科(不含明經、明法) - 正奏名諸科
    科舉制舉: 秀才(宋及以前) - 秀才
    尚宗女 = 駙馬 - multiple entities
    以文學、文藝補官 - remove
    貢生 = 貢監生(籠統) (明清賓貢,功貢) - multiple entities: 貢生、貢監生、賓貢、功貢
    貢生: 選貢(優貢 after 1628) - multiple entities: 貢生、選貢、優貢
    監生: 蔭監(含明代官生、恩生,或清代恩廕生、難廕生) - multiple entities: 監生、蔭監、官生、恩生、恩廕生、難廕生
    其他蔭補(確定非聖節、大禮、致仕、遺表、死事蔭補) - 蔭補
    明清賓貢,功貢 - multiple entities: 賓貢、功貢
    其他 - remove
    以茂才,才行,武功,廉仁等科舉/授官 (非制科) - remove
    吏部試 (隋唐) - remove
    科舉: 三史 - remove
    科舉: 九經 - remove
    科舉: 五經 - remove
    科舉制舉: 百篇 - remove
    特賜補官、准赦文除授等 - remove “等”
    科舉學校: 恩賜出身、特賜出身等 - remove “等”
    *(籠統) - remove(籠統)

Remove list:
宗教: 受洗
宗教: 做喇嘛
內務府 (清朝)
於國內公立私立大學就學、畢業
布衣
民人
書院
封土建藩(始封)
皇子/親王
俊秀
披甲
外戚
宗室
覺羅
得度
科舉: 詞科
馬甲
清朝: 考取官位
閑散
吏部試 (隋唐)
前鋒
護軍
行伍
領催

  1. "Line Breaker":
    、()()::/=;;,

  2. *學校* - remove(Should be applied after 5)

  3. Remove duplicates

  4. Replace blank " " by ""

  5. Remove the whole entry if len(office_title) <=1

  6. Sorting rule: Descending order of the length

Work plan for the office titles

  1. Data source table: OFFICE_CODES.

  2. Data source fields: OFFICE_CODES.c_office_chn, OFFICE_CODES.c_office_chn_alt, OFFICE_CODES.c_dy.

  3. Output schema(two columns): office_chn, c_dy.

  4. How to create office_chn for the output:

  • OFFICE_CODES.c_office_chn
  • OFFICE_CODES.c_office_chn_alt: separate each alternative titles by semicolons.
  1. Clean data rules:
  • Get rid of anything within brackets [((].*[))] => ""
  • Remove the whole entry if it contains 、
  • Remove the whole entry if it contains [a-zA-Z]
  • Remove the whole entry if it contains 某
  • Remove the whole entry if len(office_title) <=1
  • Remove the whole entry if it contains *
  • Remove the whole entry if it contains [ or ]
  1. Sorting rule: Descending order of the length

  2. Remove duplicates

  3. replace blank " " by ""

  4. Remove list:

  • 進士

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.