Datasets:

Modalities:
Text
Formats:
parquet
Libraries:
Datasets
Dask
License:
File size: 2,736 Bytes
c6dcf22
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
afbf725
 
 
 
 
 
c6dcf22
afbf725
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
---
dataset_info:
  features:
  - name: ml
    dtype: string
  - name: en
    dtype: string
  splits:
  - name: train
    num_bytes: 1133730838
    num_examples: 27787044
  download_size: 520146321
  dataset_size: 1133730838
configs:
- config_name: default
  data_files:
  - split: train
    path: data/train-*
license: cc
language:
- ml
- en
size_categories:
- 1M<n<10M
---

## English Malayalam Names

### Dataset Description

This dataset has 27787044 person names both in English and Malayalam. The source for this dataset is various election roles published by Government.

Derived From: https://huggingface.co/datasets/santhosh/english-malayalam-names 

- **Curated by:** Bajiyo Baiju
- **License:** CC-BY-SA-4.0


## Uses

- English <-> Malayalam name transliteration tasks
- Named entity recognition
- Person name recognition

## Dataset Curation

```
# Assuming 'ml' is the column containing Malayalam names and 'en' is the English names column in your dataset
from datasets import load_dataset

data = load_dataset("santhosh/english-malayalam-names")

malayalam_names = data['ml'].tolist() 
english_names = data['en'].tolist()

# Define a function to check if a name contains mostly English characters
def is_english_name(name):
    english_char_count = sum(c.isalpha() and c.isascii() for c in name)
    return english_char_count / len(name) > 0.5  # Adjust the threshold as needed

# Find and count names that are likely to be English in 'ml' column
english_names_ml_column = [name for name in malayalam_names if is_english_name(name)]
count_english_names_ml_column = len(english_names_ml_column)

# Find Malayalam words in the 'en' column
malayalam_words_en_column = [word for word in english_names if not any(c.isascii() for c in word)]
count_malayalam_words_en_column = len(malayalam_words_en_column)

# Print the results
print("Count of English-like Names in Malayalam Names Column:", count_english_names_ml_column)
#print("English-like Names in Malayalam Names Column:", english_names_ml_column)

print("\nCount of Malayalam Words in English Names Column:", count_malayalam_words_en_column)
print("Malayalam Words in English Names Column:", malayalam_words_en_column)

# Identify English-like names and remove them
english_names_mask = data['ml'].isin(english_names_ml_column)
data = data[~english_names_mask]

# Identify Malayalam words and remove them
malayalam_words_mask = data['en'].isin(malayalam_words_en_column)
data = data[~malayalam_words_mask]

# Remove empty rows
data = data[(data['ml'] != '') & (data['en'] != '')]

# Verify the changes
print("Updated 'ml' column after removing English-like Names:")
print(data['ml'])

print("\nUpdated 'en' column after removing Malayalam Words:")
print(data['en'])
```