This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get remove \ | |
aisleriot \ | |
brltty \ | |
duplicity \ | |
empathy \ | |
empathy-common \ | |
example-content \ | |
gnome-accessibility-themes \ | |
gnome-contacts \ | |
gnome-mahjongg \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# gridSVG::grid.garnish can be used to add SVG attributes to elements of a plot! | |
# we don't even need to do it one at a time: with the option `group = FALSE`, we | |
# can give it a vector of values for an attribute and garnish an entire geom at | |
# once. the only rub is that sometimes ggplot2 shuffles your data around when | |
# plotting it. we need to check how the data was reordered, and arrange our | |
# original data to match, before we send it to grid.garnish. | |
library(tidyverse) | |
library(magrittr) | |
library(grid) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def measure_semantic_shift_by_neighborhood(model1,model2,word,k=25,verbose=False): | |
""" | |
Basic implementation of William Hamilton (@williamleif) et al's measure of semantic change | |
proposed in their paper "Cultural Shift or Linguistic Drift?" (https://arxiv.org/abs/1606.02821), | |
which they call the "local neighborhood measure." They find this measure better suited to understand | |
the semantic change of nouns owing to "cultural shift," or changes in meaning "local" to that word, | |
rather than global changes in language ("linguistic drift") use that are better suited to a | |
Procrustes-alignment method (also described in the same paper.) | |
Arguments are: |