latin_author_dll_id / README.md
Samuel J. Huskey
update: readme file
35d4de0
metadata
license: agpl-3.0
task_categories:
  - text-classification
language:
  - en
  - la
size_categories:
  - 10K<n<100K

Latin Author Name to Digital Latin Library ID Concordance

This dataset contains variant names of authors of works in Latin and their corresponding identifier in the Digital Latin Library's Catalog.

The variant names were gathered from the Virtual International Authority File records for the authors. In instances where an author's name has few or no known variant name forms, pseudo-variant names were generated by "misspelling" the name using the following script:

from textblob import Word
import random

def generate_variations(name, num_variations=8, existing_variations=None):
    if existing_variations is None:
        existing_variations = set()
        
    while len(existing_variations) < num_variations:
        variation = list(name)
        print(f"Generating variations for {name}. Existing count: {len(existing_variations)}")
        num_changes = random.randint(1, 2)  # Randomly choose the number of changes
        for _ in range(num_changes):
            idx = random.randint(0, len(variation) - 1)
            if variation[idx].isalpha():
                # Randomly change the letter
                variation[idx] = chr(random.randint(97, 122))
        
        # Create a string from the list
        variation_str = ''.join(variation)
        
        # Use TextBlob to correct the spelling slightly to create realistic variations
        corrected = str(Word(variation_str).spellcheck()[0][0])
        existing_variations.add(corrected)
    
    return list(existing_variations)