From 006583c06d200fd2d8ee5ade3e38d4fc59f05c48 Mon Sep 17 00:00:00 2001 From: Aurojit Panda Date: Sat, 23 Sep 2017 09:50:39 -0700 Subject: [PATCH] Escape braces in perl regex `fetch_all_data.sh` failed to get Wikipedia data because Perl would throw an error. This change correctly escapes braces where necessary. --- data/word_embeddings/wikifil.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/word_embeddings/wikifil.pl b/data/word_embeddings/wikifil.pl index 14e9883..6d497f8 100644 --- a/data/word_embeddings/wikifil.pl +++ b/data/word_embeddings/wikifil.pl @@ -31,8 +31,8 @@ s/\[\[category:([^|\]]*)[^]]*\]\]/[[$1]]/ig; # show categories without markup s/\[\[[a-z\-]*:[^\]]*\]\]//g; # remove links to other languages s/\[\[[^\|\]]*\|/[[/g; # remove wiki url, preserve visible text - s/{{[^}]*}}//g; # remove {{icons}} and {tables} - s/{[^}]*}//g; + s/\{\{[^\}]*\}\}//g; # remove {{icons}} and {tables} + s/\{[^\}]*\}//g; s/\[//g; # remove [ and ] s/\]//g; s/&[^;]*;/ /g; # remove URL encoded chars