This model has been fine-tuned using methodologies from the paper
"LinkTransformer: A Unified Package for Record Linkage with Transformer Language Models" by Abhishek Arora and Melissa Dell from Harvard University.
This model is designed to find the top (N) most similar Classical Chinese office titles in a given data frame. Given an input DataFrame containing (K) office titles, the model outputs the top (N) most similar office titles in the input DataFrame for every office title.
The data used for fine-tuning this model is supported by the China Biographical Database (CBDB) at Harvard University. All office titles from the training data are from the periods of the Song, Ming, and Qing dynasties.
The following section demonstrates how to directly load the OfficeTitleDis model.
Please ensure that you have the necessary libraries installed and model downloaded in your Python environment. If not, you can install it using pip:
1git lfs install
2git clone https://huggingface.co/cbdb/OfficeTitleDis
3pip install linktransformer
4pip install hanziconv
1# Import necessary libraries from linktransformer
2import linktransformer as lt
3
4# predict
5df_lm_matched = lt.merge(df1, df2, merge_type='1:m', on="office_name", model="/content/OfficeTitleDis/model", left_on=None, right_on=None)
6display(df_lm_matched.head())
Except where otherwise noted, content on this repository is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (CC BY-NC-SA 4.0).
To view a copy of this license, visit
http://creativecommons.org/licenses/by-nc-sa/4.0/ or
send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.