Samuel J. Huskey commited on
Commit
35d4de0
·
1 Parent(s): a58af17

update: readme file

Browse files
Files changed (1) hide show
  1. README.md +35 -1
README.md CHANGED
@@ -7,4 +7,38 @@ language:
7
  - la
8
  size_categories:
9
  - 10K<n<100K
10
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
  - la
8
  size_categories:
9
  - 10K<n<100K
10
+ ---
11
+
12
+ # Latin Author Name to Digital Latin Library ID Concordance
13
+
14
+ This dataset contains variant names of authors of works in Latin and their corresponding identifier in the [Digital Latin Library's Catalog](https://catalog.digitallatin.org/).
15
+
16
+ The variant names were gathered from the [Virtual International Authority File](https://viaf.org/) 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:
17
+
18
+ ```python
19
+ from textblob import Word
20
+ import random
21
+
22
+ def generate_variations(name, num_variations=8, existing_variations=None):
23
+ if existing_variations is None:
24
+ existing_variations = set()
25
+
26
+ while len(existing_variations) < num_variations:
27
+ variation = list(name)
28
+ print(f"Generating variations for {name}. Existing count: {len(existing_variations)}")
29
+ num_changes = random.randint(1, 2) # Randomly choose the number of changes
30
+ for _ in range(num_changes):
31
+ idx = random.randint(0, len(variation) - 1)
32
+ if variation[idx].isalpha():
33
+ # Randomly change the letter
34
+ variation[idx] = chr(random.randint(97, 122))
35
+
36
+ # Create a string from the list
37
+ variation_str = ''.join(variation)
38
+
39
+ # Use TextBlob to correct the spelling slightly to create realistic variations
40
+ corrected = str(Word(variation_str).spellcheck()[0][0])
41
+ existing_variations.add(corrected)
42
+
43
+ return list(existing_variations)
44
+ ```