Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
Analysing and Mitigating Origin Bias in German Word Embeddings
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Aileen Reichelt
Analysing and Mitigating Origin Bias in German Word Embeddings
Commits
094c3e5b
Commit
094c3e5b
authored
1 year ago
by
Aileen Reichelt
Browse files
Options
Downloads
Patches
Plain Diff
Add script for checking fasttext vocab
parent
7e9f3739
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
check_fasttext_vocab.py
+17
-0
17 additions, 0 deletions
check_fasttext_vocab.py
count_name_occurrences_wikipedia.py
+0
-0
0 additions, 0 deletions
count_name_occurrences_wikipedia.py
with
17 additions
and
0 deletions
check_fasttext_vocab.py
0 → 100644
+
17
−
0
View file @
094c3e5b
"""
Find out vocab counts and positions for names in
names lists, in German fasttext model.
"""
import
fasttext
import
pandas
as
pd
df
=
pd
.
read_csv
(
"
../data/names_nationality_data.csv
"
)
df
[
"
in_fasttext_vocab
"
]
=
0
model
=
fasttext
.
load_model
(
"
cc.de.300.bin
"
)
for
index
,
row
in
df
.
iterrows
():
name
=
row
[
'
name
'
]
if
name
in
model
.
words
:
df
.
at
[
index
,
"
in_fasttext_vocab
"
]
=
1
df
.
to_csv
(
"
../data/names_nationality_fasttext.csv
"
,
index
=
False
)
This diff is collapsed.
Click to expand it.
count_name_occurrences.py
→
count_name_occurrences
_wikipedia
.py
+
0
−
0
View file @
094c3e5b
File moved
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment