krm_ndl #
This file compiles links to the images of the Kanchi-in manuscript of the Ruiju Myōgishō that are publicly available in the National Diet Library Digital Collections.
This data cross-references the locations within the Kanchi-in manuscript of the Ruiju Myōgishō with their corresponding URLs in the National Diet Library Digital Collections. The file name is KRM_ndl.tsv.
This data indicates the volume name, radical character, Kazama edition page number, Tenri edition page number, and the URL for the National Diet Library Digital Collections.
Next, a sample of the beginning of the data is shown below.
| Book | Radical | Kazama | Tenri | NDL_url |
|---|---|---|---|---|
| 仏上 | 人 | 1 | 23 | https://dl.ndl.go.jp/info:ndljp/pid/2586891/6 |
| 仏上 | 人 | 2 | 24 | https://dl.ndl.go.jp/info:ndljp/pid/2586891/7 |
Integration with krm_main #
To integrate with krm_main, you can ask the following questions using generative AI tools like ChatGPT or Gemini to get appropriate answers. While the instructions here are to use Excel, if you wish to process the data with Python, simply replace Excel with Python.
Below are examples of questions and answers for ChatGPT.
Questions #
How can I join the krm_main.tsv and krm_ndl.tsv files in Excel using the kazama_location column in krm_main.tsv and the Kazama column in krm_ndl.tsv? Please also include the following mapping:
- “仏上” → “K01”
- “仏中” → “K02”
- “仏下本” → “K03”
- “仏下末” → “K04”
- “法上” → “K05”
- “法中” → “K06”
- “法下” → “K07”
- “僧上” → “K08”
- “僧中” → “K09”
- “僧下” → “K10”
Here are the sample data for the files:
Sample krm_main.tsv:
#
| entry_id | hanzi_id | kazama_location | tenri_location | volume_name | radical_name | volume_radical_index | hanzi_entry | original_entry | definition |
|---|---|---|---|---|---|---|---|---|---|
| F00001 | S00001 | K01001310 | Ta023310 | 仏上 | 人 | v1#1 | 人 | 〇 | 音仁(LV)「ニン」 ヒト(HL) ワレ(LL) サネ マホル ユク |
| F00002 | S00002 | K01001331 | Ta023331 | 仏上 | 人 | v1#1 | 一/人 | 〇/〇 | ヒトリ(LH_) |
| F00003 | S00004 | K01001341 | Ta023341 | 仏上 | 人 | v1#1 | 二/人 | 〇/〇 | フタリ(HHL) |
Sample krm_ndl.tsv:
#
| Book | Radical | Kazama | Tenri | NDL_url |
|---|---|---|---|---|
| 仏上 | 人 | 1 | 23 | https://dl.ndl.go.jp/info:ndljp/pid/2586891/6 |
| 仏上 | 人 | 2 | 24 | https://dl.ndl.go.jp/info:ndljp/pid/2586891/7 |
| 仏上 | 人 | 3 | 25 | https://dl.ndl.go.jp/info:ndljp/pid/2586891/7 |
Answers #
To join the krm_main.tsv and krm_ndl.tsv files in Excel using the kazama_location column in krm_main.tsv and the Kazama column in krm_ndl.tsv, follow these steps:
-
Prepare the Data:
- Import both the
krm_main.tsvandkrm_ndl.tsvfiles into Excel as separate sheets. Name themkrm_mainandkrm_ndl.
- Import both the
-
Create a Mapping Table:
- Create a new sheet (for example, named “Mapping”) to include the mapping between
kazama_locationandKazamacodes. Use the following mapping:
kazama_location Kazama 仏上 K01 仏中 K02 仏下本 K03 仏下末 K04 法上 K05 法中 K06 法下 K07 僧上 K08 僧中 K09 僧下 K10 - Create a new sheet (for example, named “Mapping”) to include the mapping between
-
Lookup the Kazama Code:
- In the
krm_mainsheet, add a new column (e.g., “Kazama Code”). - Use the
VLOOKUPfunction to lookup the value inkazama_locationand return the correspondingKazamacode from the “Mapping” sheet.
Enter the following formula in the new column (e.g., G2):
=VLOOKUP(D2, Mapping!$A$2:$B$11, 2, FALSE)D2is the cell in thekazama_locationcolumn in thekrm_mainsheet.Mapping!$A$2:$B$11refers to the range in the “Mapping” sheet that contains thekazama_locationandKazamavalues.
- In the
-
Join the Data:
- Use
VLOOKUPagain to joinkrm_mainandkrm_ndlbased on theKazamacode. - For example, in the
krm_mainsheet, use this formula to retrieve theNDL_urlfrom thekrm_ndlsheet:
=VLOOKUP(G2, krm_ndl!$C$2:$E$100, 3, FALSE)G2is the “Kazama Code” column in thekrm_mainsheet.krm_ndl!$C$2:$E$100refers to the range in thekrm_ndlsheet that includes theKazamaandNDL_urlcolumns.
- Use
Summary #
With this approach, you can:
- Create a mapping table between
kazama_locationandKazamacodes. - Use
VLOOKUPto joinkrm_mainandkrm_ndlbased on theKazamacode.
This method allows you to efficiently join the data using the mapping and Excel functions.