Skip to content

Instantly share code, notes, and snippets.

@halfak
Created January 9, 2020 16:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save halfak/a2073ae3fd59ad0f0fdbebd5dedcafa3 to your computer and use it in GitHub Desktop.
Save halfak/a2073ae3fd59ad0f0fdbebd5dedcafa3 to your computer and use it in GitHub Desktop.
w2v = aggregators.mean(
revision_text_vectors,
vector=True,
name="revision.text.google_news_vector_mean"
)
# Define pronoun features
# ... preamble to defining features
female_pronouns_count = aggregators.len(female_pronouns)
pronoun_features = [
female_pronouns_count,
male_pronouns_count,
female_pronouns_count + male_pronouns_count,
female_pronouns_count / (female_pronouns_count + male_pronouns_count)
]
drafttopic = [w2v] + pronoun_features
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment