日本語
krm_ndl

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:

  1. Prepare the Data:

    • Import both the krm_main.tsv and krm_ndl.tsv files into Excel as separate sheets. Name them krm_main and krm_ndl.
  2. Create a Mapping Table:

    • Create a new sheet (for example, named “Mapping”) to include the mapping between kazama_location and Kazama codes. Use the following mapping:
    kazama_location Kazama
    仏上 K01
    仏中 K02
    仏下本 K03
    仏下末 K04
    法上 K05
    法中 K06
    法下 K07
    僧上 K08
    僧中 K09
    僧下 K10
  3. Lookup the Kazama Code:

    • In the krm_main sheet, add a new column (e.g., “Kazama Code”).
    • Use the VLOOKUP function to lookup the value in kazama_location and return the corresponding Kazama code from the “Mapping” sheet.

    Enter the following formula in the new column (e.g., G2):

    =VLOOKUP(D2, Mapping!$A$2:$B$11, 2, FALSE)
    
    • D2 is the cell in the kazama_location column in the krm_main sheet.
    • Mapping!$A$2:$B$11 refers to the range in the “Mapping” sheet that contains the kazama_location and Kazama values.
  4. Join the Data:

    • Use VLOOKUP again to join krm_main and krm_ndl based on the Kazama code.
    • For example, in the krm_main sheet, use this formula to retrieve the NDL_url from the krm_ndl sheet:
    =VLOOKUP(G2, krm_ndl!$C$2:$E$100, 3, FALSE)
    
    • G2 is the “Kazama Code” column in the krm_main sheet.
    • krm_ndl!$C$2:$E$100 refers to the range in the krm_ndl sheet that includes the Kazama and NDL_url columns.

Summary #

With this approach, you can:

  • Create a mapping table between kazama_location and Kazama codes.
  • Use VLOOKUP to join krm_main and krm_ndl based on the Kazama code.

This method allows you to efficiently join the data using the mapping and Excel functions.