diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..e35bb160 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +temp +venv +__pycache__ diff --git a/json_data/cnndm_sample.train.0.json b/json_data/cnndm_sample.train.0.json deleted file mode 100755 index c2d84ab9..00000000 --- a/json_data/cnndm_sample.train.0.json +++ /dev/null @@ -1,5596 +0,0 @@ -[ - { - "src": [ - [ - "(", - "cnn", - ")", - "--", - "that", - "chris", - "smith", - "made", - "an", - "inspiring", - ",", - "gorgeous", - "video", - "of", - "himself", - "juggling", - "around", - "iceland", - "earlier", - "this", - "year", - ",", - "and", - "that", - "it", - "'s", - "been", - "viewed", - "more", - "than", - "700,000", - "times", - "on", - "youtube", - ",", - "is", - "n't", - "all", - "that", - "surprising", - "once", - "you", - "get", - "to", - "know", - "him", - "." - ], - [ - "the", - "28-year-old", - "from", - "lake", - "tahoe", - ",", - "california", - ",", - "has", - "been", - "juggling", - "for", - "16", - "years", - ",", - "performing", - "at", - "los", - "angeles", - "lakers", - "and", - "clippers", - "basketball", - "games", - ",", - "in", - "las", - "vegas", - "and", - "abroad", - "." - ], - [ - "with", - "his", - "skills", - ",", - "it", - "was", - "a", - "natural", - "transition", - "to", - "audition", - "for", - "the", - "blue", - "man", - "group", - ",", - "which", - "promptly", - "cast", - "him", - "and", - "sent", - "him", - "to", - "perform", - "in", - "blue", - "man", - "theaters", - "in", - "new", - "york", - ",", - "chicago", - "and", - "orlando", - ",", - "and", - "as", - "part", - "of", - "a", - "national", - "tour", - "." - ], - [ - "now", - "in", - "los", - "angeles", - "to", - "pursue", - "acting", - "and", - "writing", - "(", - "in", - "between", - "blue", - "man", - "fill-in", - "work", - ")", - ",", - "smith", - "is", - "still", - "basking", - "in", - "the", - "midnight", - "sun", - "of", - "nordic", - "stardom", - "." - ], - [ - "cnn", - ":", - "how", - "has", - "becoming", - "an", - "internet", - "sensation", - "changed", - "your", - "life", - "?" - ], - [ - "chris", - "smith", - ":", - "i", - "now", - "only", - "eat", - "the", - "finest", - "meats", - "and", - "drink", - "only", - "vintage", - "wines", - "." - ], - [ - "hardly", - "." - ], - [ - "haha", - ",", - "nothing", - "is", - "different", - "." - ], - [ - "i", - "just", - "think", - "it", - "'s", - "a", - "nice", - "feeling", - "that", - "people", - "took", - "something", - "positive", - "away", - "from", - "the", - "video", - "." - ], - [ - "that", - "maybe", - "they", - "got", - "to", - "see", - "that", - "juggling", - "can", - "be", - "more", - "than", - "just", - "a", - "guy", - "in", - "a", - "sequin", - "tie", - "performing", - "as", - "an", - "opening", - "act", - "for", - "a", - "magician", - "." - ], - [ - "not", - "that", - "there", - "'s", - "anything", - "wrong", - "with", - "that", - "!" - ], - [ - "cnngo", - "in", - "reykjavik" - ], - [ - "cnn", - ":", - "is", - "juggling", - "a", - "normal", - "part", - "of", - "your", - "travels", - "or", - "was", - "this", - "just", - "a", - "one-off", - "bit", - "of", - "inspired", - "fun", - "?" - ], - [ - "chris", - "smith", - ":", - "juggling", - "is", - "a", - "part", - "of", - "my", - "life", - "!" - ], - [ - "i", - "always", - "carry", - "some", - "beanbags", - "around", - "with", - "me", - ",", - "but", - "i", - "juggle", - "mostly", - "just", - "to", - "relieve", - "stress", - "and", - "have", - "fun", - "rather", - "than", - "perform", - "." - ], - [ - "iceland", - "was", - "an", - "exception", - "." - ], - [ - "i", - "had", - "just", - "purchased", - "a", - "new", - "camera", - "and", - "the", - "idea", - "struck", - "me", - "while", - "i", - "was", - "driving", - "around", - "the", - "country", - "." - ], - [ - "it", - "was", - "really", - "supposed", - "to", - "be", - "a", - "fun", - "way", - "to", - "show", - "family", - "and", - "friends", - "my", - "trip", - ",", - "and", - "to", - "try", - "an", - "experiment", - "with", - "the", - "camera", - "." - ], - [ - "cnn", - ":", - "did", - "your", - "juggling", - "attract", - "attention", - "from", - "locals", - "?" - ], - [ - "chris", - "smith", - ":", - "for", - "the", - "most", - "part", - "in", - "iceland", - ",", - "i", - "was", - "on", - "my", - "own", - "." - ], - [ - "i", - "did", - ",", - "however", - ",", - "have", - "to", - "accept", - "the", - "fact", - "that", - "i", - "was", - "some", - "random", - "dude", - "juggling", - "for", - "goats", - "in", - "the", - "middle", - "of", - "nowhere", - "." - ], - [ - "how", - "to", - "be", - "a", - "reykjaviker" - ], - [ - "cnn", - ":", - "with", - "all", - "the", - "juggling", - "near", - "cliffs", - "and", - "water", - ",", - "did", - "you", - "lose", - "any", - "balls", - "while", - "shooting", - "the", - "video", - "?" - ], - [ - "chris", - "smith", - ":", - "i", - "can", - "proudly", - "say", - "that", - "i", - "did", - "n't", - "lose", - "a", - "single", - "one", - "." - ], - [ - "i", - "definitely", - "dropped", - "them", - "down", - "hills", - "and", - "ravines", - ",", - "but", - "i", - "managed", - "to", - "get", - "them", - "back", - "." - ], - [ - "cnn", - ":", - "juggling", - "aside", - ",", - "what", - "was", - "the", - "best", - "part", - "of", - "iceland", - "?" - ], - [ - "chris", - "smith", - ":", - "the", - "dramatic", - "beauty", - "of", - "the", - "country", - "." - ], - [ - "i", - "literally", - "felt", - "like", - "i", - "was", - "on", - "another", - "planet", - "." - ], - [ - "driving", - "around", - ",", - "you", - "get", - "this", - "feeling", - "sometimes", - "like", - "you", - "'re", - "the", - "only", - "one", - "in", - "the", - "world", - "who", - "knows", - "this", - "place", - "exists", - "." - ], - [ - "it", - "kinda", - "feels", - "like", - "a", - "well-kept", - "secret", - "." - ], - [ - "11", - "of", - "reykjavik", - "'s", - "coolest", - "bars" - ], - [ - "cnn", - ":", - "has", - "the", - "popularity", - "of", - "this", - "video", - "inspired", - "more", - "travel/juggling", - "projects", - "?" - ], - [ - "chris", - "smith", - ":", - "absolutely", - "!" - ], - [ - "i", - "made", - "another", - "pov", - "video", - "immediately", - "afterward", - "that", - "tracks", - "my", - "journey", - "from", - "hawaii", - "to", - "new", - "york", - "city", - ",", - "which", - "garnered", - "quite", - "a", - "few", - "strange", - "looks", - ",", - "as", - "there", - "are", - "a", - "few", - "more", - "people", - "in", - "new", - "york", - "than", - "the", - "countryside", - "of", - "iceland", - "." - ], - [ - "cnn", - ":", - "how", - "long", - "have", - "you", - "been", - "juggling", - "?" - ], - [ - "chris", - "smith", - ":", - "since", - "i", - "was", - "12", - "." - ], - [ - "i", - "learned", - "on", - "a", - "family", - "road", - "trip", - "to", - "yellowstone", - "(", - "national", - "park", - ")", - "as", - "our", - "rv", - "kept", - "breaking", - "down", - ",", - "stranding", - "us", - "in", - "repair", - "shops", - "across", - "america", - "." - ], - [ - "in", - "a", - "cafã", - "©", - "in", - "the", - "middle", - "of", - "nowhere", - "i", - "found", - "a", - "book", - "called", - "\"", - "juggling", - "for", - "the", - "complete", - "klutz", - "\"", - "that", - "came", - "with", - "three", - "beanbags", - "." - ], - [ - "i", - "begged", - "my", - "dad", - "to", - "get", - "it", - "for", - "me", - ",", - "to", - "which", - "he", - "said", - "the", - "magic", - "words", - ":", - "\"", - "yeah", - ",", - "right", - "." - ], - [ - "like", - "you", - "'ll", - "ever", - "use", - "that", - ".", - "\"" - ], - [ - "the", - "gauntlet", - "was", - "thrown", - "." - ], - [ - "i", - "have", - "n't", - "stopped", - "juggling", - "since", - "." - ], - [ - "cnn", - ":", - "do", - "you", - "perform", - "live", - "?" - ], - [ - "chris", - "smith", - ":", - "i", - "do", - "n't", - "perform", - "as", - "often", - "as", - "i", - "did", - "in", - "college", - ",", - "when", - "i", - "was", - "known", - "as", - "the", - "ucla", - "juggler", - "." - ], - [ - "you", - "can", - "google", - "image", - "it", - "for", - "a", - "laugh", - "." - ], - [ - "it", - "was", - "a", - "position", - "i", - "pitched", - "to", - "the", - "marching", - "band", - "director", - "as", - "a", - "potential", - "\"", - "alternate", - "option", - "\"", - "to", - "a", - "baton", - "twirler", - "." - ], - [ - "he", - "went", - "for", - "the", - "idea", - ",", - "and", - "as", - "a", - "result", - ",", - "i", - "ended", - "up", - "performing", - "with", - "the", - "ucla", - "marching", - "band", - "at", - "football", - "and", - "basketball", - "games", - "around", - "the", - "country", - "." - ], - [ - "that", - "branched", - "out", - "into", - "solo", - "performances", - "at", - "lakers", - "and", - "clippers", - "games", - "as", - "well", - "as", - "some", - "gigs", - "in", - "vegas", - "and", - "abroad", - "." - ], - [ - "since", - "doing", - "blue", - "man", - ",", - "i", - "have", - "n't", - "had", - "as", - "much", - "time", - "." - ], - [ - "elf", - "school", - "spills", - "secrets", - "of", - "iceland", - "'s", - "`", - "hidden", - "people", - "'" - ], - [ - "cnn", - ":", - "how", - "many", - "countries", - "have", - "you", - "been", - "to", - "?" - ], - [ - "chris", - "smith", - ":", - "probably", - "20", - "." - ], - [ - "cnn", - ":", - "best", - "country/destination", - "for", - "juggling", - "?" - ], - [ - "chris", - "smith", - ":", - "that", - "'s", - "tough", - "to", - "say", - "." - ], - [ - "iceland", - "is", - "obviously", - "up", - "there", - "because", - "of", - "the", - "response", - "to", - "the", - "video", - ",", - "but", - "i", - "'d", - "probably", - "have", - "to", - "say", - "nepal", - "is", - "the", - "best/most", - "memorable", - "juggling", - "location", - "for", - "me", - "." - ], - [ - "i", - "went", - "trekking", - "there", - "for", - "a", - "month", - "in", - "2010", - "with", - "a", - "couple", - "friends", - "and", - "brought", - "five", - "juggling", - "beanbags", - "along", - "." - ], - [ - "i", - "pulled", - "them", - "out", - "on", - "occasion", - "and", - "performed", - "at", - "various", - "villages", - "up", - "in", - "the", - "himalayas", - "--", - "it", - "was", - "pretty", - "clear", - "that", - "most", - "of", - "the", - "locals", - "had", - "never", - "seen", - "anything", - "like", - "it", - "." - ], - [ - "one", - "time", - "that", - "sticks", - "out", - "in", - "particular", - ",", - "was", - "when", - "our", - "bus", - "from", - "kathmandu", - "to", - "duerali", - "[", - "a", - "village", - "in", - "the", - "mountains", - "]", - "got", - "a", - "flat", - "tire", - "and", - "we", - "had", - "to", - "pull", - "off", - "while", - "they", - "fashioned", - "some", - "sort", - "of", - "janky", - ",", - "quick-fix", - "to", - "keep", - "the", - "bus", - "from", - "falling", - "apart", - "." - ], - [ - "the", - "bus", - "was", - "packed", - "inside", - ",", - "and", - "there", - "were", - "about", - "twenty", - "people", - "sitting", - "on", - "the", - "roof", - "." - ], - [ - "while", - "we", - "were", - "waiting", - ",", - "i", - "stepped", - "outside", - "and", - "did", - "an", - "impromptu", - "juggling", - "show", - "." - ], - [ - "more", - "people", - "crammed", - "on", - "top", - "to", - "watch", - ",", - "and", - "after", - "the", - "bus", - "was", - "fixed", - ",", - "they", - "stayed", - "sitting", - "up", - "there", - "." - ], - [ - "a", - "few", - "miles", - "down", - "the", - "road", - ",", - "blood", - "started", - "to", - "drip", - "down", - "the", - "front", - "windshield", - "." - ], - [ - "which", - ",", - "we", - "later", - "found", - "out", - "was", - "because", - "too", - "many", - "people", - "were", - "on", - "the", - "roof", - "and", - "someone", - "sat", - "on", - "a", - "chicken", - "cage", - "." - ], - [ - "i", - "still", - "carry", - "a", - "little", - "bit", - "of", - "guilt", - "for", - "my", - "association", - "with", - "that", - "chicken", - "'s", - "death", - "." - ], - [ - "although", - ",", - "they", - "cooked", - "it", - "up", - "in", - "the", - "next", - "village", - "and", - "all", - "was", - "right", - "again", - "." - ], - [ - "cnn", - ":", - "where", - "can", - "people", - "see", - "more", - "of", - "your", - "work", - "?" - ], - [ - "chris", - "smith", - ":", - "my", - "juggling", - "persona", - "is", - "that", - "juggler", - "guy", - "." - ], - [ - "you", - "can", - "see", - "some", - "of", - "my", - "juggling", - "videos", - "here", - "." - ], - [ - "you", - "can", - "see", - "some", - "of", - "my", - "sketch", - "videos", - "here", - "." - ], - [ - "and", - "check", - "out", - "the", - "blue", - "man", - "group", - "." - ], - [ - "you", - "never", - "know", - ",", - "i", - "might", - "be", - "in", - "the", - "show", - "you", - "'re", - "watching", - "!" - ] - ], - "tgt": [ - [ - "pov", - "video", - "has", - "gone", - "viral", - "on", - "youtube" - ], - [ - "juggler", - "chris", - "smith", - "says", - "he", - "was", - "impressed", - "by", - "the", - "beauty", - "of", - "iceland" - ], - [ - "smith", - "has", - "been", - "juggling", - "for", - "16", - "years" - ] - ] - }, - { - "src": [ - [ - "by" - ], - [ - "joshua", - "gardner" - ], - [ - "published", - ":" - ], - [ - "17:08", - "est", - ",", - "11", - "june", - "2013" - ], - [ - "|" - ], - [ - "updated", - ":" - ], - [ - "17:11", - "est", - ",", - "11", - "june", - "2013" - ], - [ - "a", - "woman", - "who", - "lost", - "her", - "wedding", - "ring", - "in", - "chicago", - "got", - "the", - "surprise", - "of", - "her", - "life", - "when", - "it", - "was", - "miraculously", - "found", - "by", - "a", - "man", - "650", - "miles", - "away", - "in", - "arkansas", - "." - ], - [ - "in", - "all", - "fairness", - ",", - "steve", - "anderson", - "was", - "shocked", - ",", - "too", - ",", - "when", - "he", - "opened", - "a", - "ups", - "package", - "while", - "at", - "work", - "and", - "found", - "a", - "diamond", - "ring", - "." - ], - [ - "`", - "every", - "day", - "we", - "pick", - "up", - "our", - "ups", - "packages", - "and", - "bring", - "them", - "in", - ",", - "'", - "said", - "anderson", - ",", - "a", - "warehouse", - "manager", - "in", - "north", - "little", - "rock", - "." - ], - [ - "`", - "but", - "after", - "opening", - "it", - "up", - ",", - "i", - "got", - "a", - "surprise", - "because", - "on", - "top", - "of", - "the", - "wrapping", - "was", - "a", - "ring", - "!", - "'" - ], - [ - "scroll", - "down", - "for", - "video", - "..." - ], - [ - "panicked", - ":", - "barb", - "kasang", - "was", - "distraught", - "after", - "losing", - "her", - "wedding", - "ring", - "while", - "working", - "at", - "the", - "same", - "job", - "she", - "'d", - "shared", - "with", - "her", - "husband", - "for", - "28", - "years" - ], - [ - "while", - "anderson", - "'s", - "reaction", - "was", - "one", - "of", - "mild", - "amusement", - ",", - "up", - "in", - "chicago", - "barb", - "kasang", - "was", - "frantically", - "searching", - "for", - "her", - "diamond", - "ring", - "." - ], - [ - "`", - "my", - "whole", - "marriage", - "is", - "tied", - "up", - "in", - "my", - "ring", - ",", - "'", - "kasang", - "told", - "katv", - "." - ], - [ - "`", - "it", - "has", - "a", - "lot", - "of", - "special", - "moments", - ".", - "'" - ], - [ - "kasang", - "and", - "husband", - "stave", - "have", - "been", - "married", - "for", - "28", - "years", - "." - ], - [ - "they", - "met", - "at", - "lovejoy", - ",", - "a", - "manufacturer", - "of", - "transmission", - "parts", - "in", - "downers", - "grove", - ",", - "illinois", - "." - ], - [ - "in", - "fact", - ",", - "they", - "both", - "still", - "work", - "there", - "." - ], - [ - "and" - ], - [ - "that", - "'s", - "where", - "kasang", - ",", - "51", - ",", - "noticed", - "she", - "'d", - "lost", - "her", - "wedding", - "ring", - "while" - ], - [ - "washing", - "her", - "hands", - "after", - "working", - "the", - "shipping", - "department", - "." - ], - [ - "the", - "same", - "ring" - ], - [ - "her", - "loving", - "husband", - "had", - "been", - "adding", - "gems", - "and", - "bands", - "to", - "over", - "the", - "years", - "." - ], - [ - "long", - "lost", - ":", - "barb", - "'s", - "husband", - "had", - "been", - "adding", - "stones", - "and", - "bands", - "since", - "they", - "married", - "." - ], - [ - "barb", - "was", - "worried", - "she", - "accidentally", - "shipped", - "the", - "ring", - "while", - "sending", - "out", - "boxes", - "for", - "work" - ], - [ - "lost", - "and", - "found", - ":", - "that", - "was", - "last", - "monday", - "in", - "chicago", - "." - ], - [ - "on", - "wednesday", - ",", - "in", - "arkansas", - ",", - "steve", - "anderson", - "found", - "a", - "wedding", - "ring", - "in", - "a", - "box", - "that", - "had", - "been", - "shipped", - "to", - "his", - "job" - ], - [ - "`", - "i", - "was", - "worried", - ",", - "hurt", - "and", - "sad", - ",", - "'", - "she", - "told", - "the", - "chicago", - "tribune", - "." - ], - [ - "`", - "it", - "was", - "traumatic", - "." - ], - [ - "i", - "did", - "n't", - "even", - "want", - "to", - "tell", - "my", - "husband", - ".", - "'" - ], - [ - "but", - "she", - "did", - "tell", - "him", - "." - ], - [ - "`", - "he", - "was", - "pretty", - "calm", - ",", - "'", - "kasang", - "said", - "." - ], - [ - "`", - "he", - "said", - ",", - "\"", - "do", - "n't", - "worry", - "about", - "it", - ",", - "we", - "'ll", - "replace", - "it", - ".", - "\"" - ], - [ - "but", - "it", - "'s", - "not", - "the", - "same", - "." - ], - [ - "to", - "me", - ",", - "it", - "'s", - "not", - "just", - "a", - "ring", - "." - ], - [ - "it", - "'s", - "like", - "half", - "of", - "my", - "life", - "is", - "in", - "there", - ".", - "'" - ], - [ - "that", - "was", - "back", - "on", - "june", - "3", - "." - ], - [ - "two", - "agonizing", - "days", - "passed", - "." - ], - [ - "good", - "deed", - ":", - "'", - "i", - "like", - "to", - "do", - "what", - "is", - "right", - "'", - "said", - "anderson", - "." - ], - [ - "he", - "returned", - "the", - "ring", - "and", - "within", - "a", - "week", - "of", - "losing", - "it", - ",", - "the", - "ring", - "was", - "back", - "on", - "barb", - "'s", - "finger" - ], - [ - "thankful", - ":", - "barb", - ",", - "here", - "with", - "her", - "husband", - ",", - "was", - "thrilled", - "." - ], - [ - "`", - "my", - "heart", - "'s", - "still", - "pounding", - ",", - "'", - "she", - "said", - "." - ], - [ - "`", - "you", - "ca", - "n't", - "say", - "enough", - "about", - "people", - "like", - "that", - ".", - "'" - ], - [ - "meanwhile", - ",", - "anderson", - "made", - "his", - "find", - "and", - "knew", - "someone", - "was", - "out", - "there", - "worried", - "." - ], - [ - "`", - "i", - "thought", - "if", - "it", - "was", - "real", - ",", - "someone", - "would", - "be", - "really", - "upset", - "about", - "it", - ",", - "'", - "he", - "said", - "." - ], - [ - "anderson", - "said", - "he", - "'d", - "lost", - "important", - "things", - "of", - "his", - "own", - "in", - "the", - "past", - "and", - "been", - "blessed", - "to", - "have", - "them", - "returned", - "." - ], - [ - "`", - "i", - "think", - "turnabout", - "is", - "fair", - "play", - ",", - "'", - "he", - "said", - "." - ], - [ - "`", - "the", - "thing", - "about", - "it", - "is", - ",", - "i", - "like", - "to", - "do", - "what", - "is", - "right", - ".", - "'" - ], - [ - "then", - ",", - "on", - "wednesday", - ",", - "kasang", - "got", - "a", - "phone", - "call", - "." - ], - [ - "anderson", - "was", - "on", - "the", - "line", - ",", - "he", - "'d", - "found", - "her", - "ring", - "and", - "tracked", - "her", - "down", - "." - ], - [ - "by", - "friday", - ",", - "she", - "was", - "happily", - "wearing", - "her", - "ring", - "again", - "." - ], - [ - "`", - "my", - "heart", - "'s", - "still", - "pounding", - ",", - "'", - "kasang", - "said", - "." - ], - [ - "`", - "we", - "got", - "lucky", - "." - ], - [ - "he", - "deserves", - "a", - "big", - "blessing", - "." - ], - [ - "there", - "'s", - "some", - "good", - "people", - "out", - "there", - "." - ], - [ - "you", - "ca", - "n't", - "say", - "enough", - "about", - "people", - "like", - "that", - "." - ], - [ - "i", - "think", - "this", - "man", - "should", - "really", - "be", - "praised", - ".", - "'" - ], - [ - "according", - "to", - "anderson", - ",", - "though", - ",", - "there", - "are", - "just", - "more", - "honest", - "people", - "out", - "there", - "than", - "we", - "think", - "." - ] - ], - "tgt": [ - [ - "650", - "miles", - "away", - "from", - "the", - "chicago", - "suburb", - "where", - "she", - "accidentally", - "sent", - "it", - "with", - "a", - "shipment", - "while", - "at", - "work", - ",", - "barb", - "kasang", - "'s", - "beloved", - "wedding", - "ring", - "was", - "found", - "by", - "kind", - "man", - "in", - "north", - "little", - "rock", - ",", - "arkansas" - ] - ] - }, - { - "src": [ - [ - "by" - ], - [ - "andrew", - "levy" - ], - [ - "published", - ":" - ], - [ - "18:08", - "est", - ",", - "22", - "october", - "2013" - ], - [ - "|" - ], - [ - "updated", - ":" - ], - [ - "20:10", - "est", - ",", - "22", - "october", - "2013" - ], - [ - "poor", - "standards", - ":", - "a", - "study", - "has", - "found", - "that", - "english", - "school", - "leavers", - "had", - "poorer", - "literacy", - ",", - "numeracy", - "and", - "problem-solving", - "skills", - "than", - "their", - "grandparents", - "(", - "library", - "image", - ")" - ], - [ - "the", - "collapse", - "in", - "educational", - "standards", - "was", - "caused", - "by", - "the", - "end", - "of", - "the", - "british", - "grammar", - "school", - "system", - ",", - "experts", - "said", - "last", - "night", - "." - ], - [ - "a", - "report", - "this", - "month", - "found", - "that", - "english", - "school", - "leavers", - "had", - "poorer", - "literacy", - ",", - "numeracy", - "and", - "problem-solving", - "skills", - "than", - "their", - "grandparents", - "--", - "the", - "only", - "place", - "among", - "24", - "wealthy", - "nations", - "where", - "this", - "was", - "the", - "case", - "." - ], - [ - "but", - "a", - "new", - "analysis", - "of", - "the", - "data", - "has", - "found", - "that", - "britain", - "'s", - "over-55s", - "actually", - "outperform", - "their", - "peers", - "in", - "other", - "countries", - "." - ], - [ - "researcher", - "dr", - "gijsbert", - "stoet", - "said", - "this", - "was", - "down", - "to", - "the", - "quality", - "of", - "british", - "schools", - "in", - "the", - "sixties", - "and", - "early", - "seventies", - "." - ], - [ - "he", - "added", - ":", - "`", - "the", - "general", - "decline", - "in", - "performance", - "is", - "due", - "to", - "the", - "ageing", - "process", - "." - ], - [ - "the", - "uk", - "was", - "the", - "only", - "country", - "where", - "there", - "was", - "a", - "blip", - "." - ], - [ - "`", - "it", - "would", - "seem", - "that", - "primary", - "and", - "secondary", - "education", - "was", - "so", - "good", - "that", - "it", - "still", - "has", - "an", - "effect", - "today", - ".", - "'" - ], - [ - "many", - "grammars", - "were", - "replaced", - "with", - "comprehensives", - "in", - "the", - "seventies", - "." - ], - [ - "today", - ",", - "there", - "are", - "just", - "164", - "left", - "." - ], - [ - "this", - "decline", - "in", - "selective", - "education", - "corresponds", - "with", - "the", - "last", - "significant", - "intake", - "of", - "grammar", - "pupils", - "whose", - "scores", - "today", - "as", - "over-55s", - "are", - "so", - "high", - "." - ], - [ - "those", - "who", - "left", - "secondary", - "school", - "in", - "1975", - "would", - "be", - "56", - "." - ], - [ - "dr", - "stoet", - ",", - "a", - "reader", - "in", - "psychology", - "at", - "glasgow", - "university", - "'s", - "school", - "of", - "education", - ",", - "said", - "that", - "in", - "almost", - "every", - "nation", - "studied", - ",", - "individuals", - "showed", - "a", - "general", - "improvement", - "in", - "the", - "three", - "areas", - "until", - "they", - "reached", - "their", - "mid", - "to", - "late-20s", - "." - ], - [ - "this", - "was", - "followed", - "by", - "a", - "sustained", - "fall", - "until", - "retirement", - ",", - "which", - "was", - "put", - "down", - "to", - "`", - "general", - "cognitive", - "decline", - "due", - "to", - "ageing", - "'", - "." - ], - [ - "but", - "the", - "only", - "exception", - "was", - "the", - "uk", - ",", - "where", - "the", - "older", - "generation", - "significantly", - "outperformed", - "contemporaries", - "in", - "other", - "nations", - "." - ], - [ - "education", - ":", - "britain", - "'s", - "over-55s", - "outperform", - "their", - "peers", - "in", - "other", - "countries", - "-", - "a", - "fact", - "that", - "researcher", - "say", - "is", - "down", - "to", - "the", - "quality", - "of", - "schooling", - "in", - "the", - "60s", - "and", - "70s", - "(", - "library", - "image", - ")" - ], - [ - "he", - "said", - ":", - "`", - "the", - "school", - "system", - "changed" - ], - [ - "from", - "one", - "where", - "children", - "went", - "to", - "a", - "secondary", - "school", - "based", - "on", - "ability", - ",", - "to" - ], - [ - "one", - "where", - "they", - "went", - "to", - "any", - "school", - ",", - "irrespective", - "of", - "ability", - "." - ], - [ - "`", - "it" - ], - [ - "is", - "most", - "likely", - "many", - "factors", - "played", - "a", - "role", - "in", - "our", - "findings", - "but", - "england" - ], - [ - "and", - "northern", - "ireland", - "did", - "so", - "unusually", - "well", - "[", - "in", - "the", - "55-plus", - "age", - "group", - "]" - ], - [ - "compared", - "to", - "other", - "countries", - "that", - "it", - "makes", - "sense", - "grammar", - "schools", - "were", - "a" - ], - [ - "major", - "factor", - ".", - "'" - ], - [ - "the", - "first" - ], - [ - "comprehensives", - "were", - "set", - "up", - "in", - "1946", - ",", - "and", - "huge", - "expansion", - "began", - "in", - "1965" - ], - [ - "under", - "harold", - "wilson", - "'s", - "labour", - "government", - "." - ], - [ - "when", - "the", - "tories", - "took", - "power", - "in" - ], - [ - "1970", - "it", - "was", - "too", - "late", - "to", - "reverse", - "the", - "decline", - "in", - "grammar", - "schools", - "." - ], - [ - "by", - "1975", - ",", - "most", - "local", - "authorities", - "had", - "abandoned", - "the", - "11-plus", - "exam", - "and", - "adopted", - "the", - "comprehensive", - "system", - "." - ], - [ - "there", - "was", - "also", - "a", - "trend", - "away", - "from", - "`", - "streaming", - "'", - "or", - "`", - "setting", - "'", - "pupils", - "according", - "to", - "ability", - "within", - "state", - "schools", - "under", - "labour", - "after", - "1997", - "." - ], - [ - "mixed", - ":", - "16", - "to", - "24", - "year", - "olds", - "in", - "england", - "and", - "northern", - "ireland", - "came", - "22nd", - "in", - "literacy", - "and", - "21st", - "in", - "numeracy", - "tests" - ], - [ - "streaming", - "puts", - "some", - "pupils", - "in", - "the", - "top", - "classes", - "for", - "all", - "subjects", - ",", - "and", - "setting", - "places", - "them", - "in", - "classes", - "in", - "each", - "subject", - "according", - "to", - "ability", - "." - ], - [ - "by", - "2007", - ",", - "the", - "proportion", - "of", - "lessons", - "taught", - "according", - "to", - "ability", - "stood", - "at", - "just", - "40", - "per", - "cent", - ",", - "while", - "in", - "some", - "subjects", - ",", - "such", - "as", - "history", - "and", - "geography", - ",", - "nearly", - "three-quarters", - "of", - "lessons", - "took", - "place", - "in", - "mixed-ability", - "classes", - "." - ], - [ - "the", - "original", - "report", - "by", - "the", - "organisation", - "for", - "economic", - "co-operation", - "and", - "development", - "looked", - "at", - "core", - "skills", - "among", - "16", - "to", - "65-year-olds", - "." - ], - [ - "those", - "aged", - "16", - "to", - "24", - "in", - "england", - "and", - "northern", - "ireland", - "came", - "22nd", - "in", - "literacy", - "and", - "21st", - "in", - "numeracy", - "." - ], - [ - "but", - "55", - "to", - "65-year-olds", - "were", - "among", - "the", - "best", - "educated", - "in", - "the", - "developed", - "world", - "." - ], - [ - "the", - "tories", - "said", - "the", - "findings", - "showed", - "the", - "last", - "labour", - "government", - "let", - "academic", - "performance", - "slide", - ",", - "even", - "as", - "marks", - "went", - "up", - "." - ], - [ - "dr", - "stoet", - "suggested", - "exam", - "marks", - "had" - ], - [ - "become", - "`", - "more", - "realistic", - "'", - "since", - "education", - "secretary", - "michael", - "gove", - "demanded" - ], - [ - "an", - "end", - "to", - "grade", - "inflation", - "." - ], - [ - "he", - "said", - "underperformance", - "among", - "16", - "to", - "55-year-olds", - "compared", - "to", - "other", - "countries", - "could", - "be", - "explained", - "by", - "the", - "comprehensive", - "system", - "." - ], - [ - "experts", - "have", - "criticised", - "the", - "dumbing", - "down", - "of", - "syllabuses", - ",", - "particularly", - "since", - "the", - "seventies", - ",", - "and", - "the", - "introduction", - "of", - "trendy", - "teaching", - "methods", - "." - ], - [ - "mr", - "gove", - "is", - "introducing", - "a", - "curriculum", - "that", - "involves", - "more", - "learning", - "by", - "rote", - "and", - "in-depth", - "study", - "." - ], - [ - "education", - "expert", - "professor", - "alan", - "smithers", - ",", - "of", - "the", - "university", - "of", - "buckingham", - ",", - "said", - ":", - "`", - "grammar", - "schools", - "picked", - "out", - "highly", - "able", - "children", - "and", - "brought", - "them", - "together", - "with", - "very", - "good", - "teachers", - "and", - "helped", - "them", - "develop", - "." - ], - [ - "`", - "in", - "english", - "there", - "was", - "an", - "emphasis", - "on", - "grammar", - "and", - "being", - "accurate", - "and", - "maths", - "required", - "the", - "ability", - "to", - "carry", - "out", - "basic", - "calculations", - "." - ], - [ - "now", - "there", - "is", - "a", - "more", - "cavalier", - "attitude", - ".", - "'" - ], - [ - "robert", - "mccartney", - ",", - "of", - "the", - "national", - "grammar", - "school", - "association", - ",", - "added", - ":", - "`", - "there", - "is", - "no", - "doubt", - "that", - "the", - "advent", - "of", - "the", - "comprehensive", - "was", - "the", - "beginning", - "of", - "a", - "downward", - "trend", - "in", - "literacy", - ",", - "numeracy", - "and", - "problem", - "solving", - ".", - "'" - ] - ], - "tgt": [ - [ - "school", - "leavers", - "had", - "poorer", - "literacy", - ",", - "numeracy", - "and", - "problem-solving", - "skills", - "than", - "their", - "grandparents", - ",", - "a", - "report", - "by", - "glasgow", - "university", - "has", - "found" - ], - [ - "england", - "only", - "country", - "among", - "24", - "wealthy", - "nations", - "where", - "this", - "was", - "the", - "case" - ], - [ - "dr", - "gijsbert", - "stoet", - "found", - "over-55s", - "outperform", - "peers", - "from", - "other", - "countries", - "-", - "a", - "fact", - "he", - "says", - "is", - "down", - "to", - "excellent", - "education", - "standards", - "in", - "the", - "60s", - "and", - "70s" - ], - [ - "`", - "education", - "was", - "so", - "good", - "it", - "still", - "has", - "an", - "effect", - "today", - ",", - "'", - "he", - "said" - ] - ] - }, - { - "src": [ - [ - "when", - "ian", - "mclaren-morris", - "named", - "his", - "12", - "meter", - "yacht", - "\"", - "silver", - "slipper", - ",", - "\"", - "he", - "never", - "could", - "have", - "known", - "it", - "would", - "bring", - "him", - "a", - "real", - "life", - "fairytale", - "romance", - "." - ], - [ - "the", - "divorced", - "father-of-two", - "had", - "long", - "dreamed", - "of", - "sailing", - "around", - "the", - "globe", - "with", - "his", - "very", - "own", - "cinderella", - ";", - "a", - "soul-mate", - "who", - "shared", - "his", - "love", - "of", - "the", - "ocean", - "and", - "sense", - "of", - "adventure", - "." - ], - [ - "but", - "finding", - "a", - "special", - "woman", - "willing", - "to", - "quit", - "her", - "job", - "and", - "say", - "goodbye", - "to", - "her", - "family", - "and", - "friends", - "for", - "a", - "romantic", - "voyage", - "into", - "the", - "sunset", - "was", - "n't", - "quite", - "as", - "straightforward", - "as", - "the", - "52-year-old", - "had", - "hoped", - "." - ], - [ - "like", - "a", - "growing", - "number", - "of", - "single", - "people", - "across", - "the", - "world", - ",", - "mclaren-morris", - "searched", - "for", - "love", - "on", - "internet", - "dating", - "websites", - "." - ], - [ - "two", - "years", - "later", - "and", - "the", - "sailor", - "was", - "still", - "no", - "closer", - "to", - "finding", - "his", - "seafaring", - "sweetheart", - "." - ], - [ - "it", - "was", - "n't", - "until", - "mclaren-morris", - "signed", - "up", - "to", - "a", - "website", - "catering", - "specifically", - "for", - "boating", - "enthusiasts", - ",", - "lovesail.com", - ",", - "that", - "he", - "found", - "the", - "woman", - "of", - "his", - "dreams", - "--", - "45-year-old", - "former", - "superyacht", - "hostess", - "wendy", - "robson-burrell", - "." - ], - [ - "the", - "pair", - "met", - "at", - "the", - "chichester", - "yacht", - "club", - "in", - "south-east", - "england", - ",", - "embarking", - "on", - "a", - "whirlwind", - "romance", - "that", - "found", - "them", - "engaged", - "just", - "six", - "months", - "later", - "." - ], - [ - "they", - "now", - "plan", - "on", - "marrying", - "in", - "april", - ",", - "sailing", - "around", - "the", - "world", - "for", - "their", - "honeymoon", - "before", - "joining", - "the", - "atlantic", - "rally", - "for", - "cruisers", - "(", - "arc", - ")", - ",", - "the", - "world", - "'s", - "largest", - "transatlantic", - "yachting", - "event", - "later", - "in", - "the", - "year", - "." - ], - [ - "\"", - "i", - "loved", - "sailing", - ",", - "i", - "had", - "my", - "own", - "boat", - ",", - "and", - "i", - "wanted", - "to", - "do", - "it", - "with", - "someone", - "who", - "got", - "the", - "same", - "excitement", - "and", - "pleasure", - "out", - "of", - "it", - ",", - "\"", - "mclaren-morris", - ",", - "a", - "former", - "sales", - "and", - "marketing", - "director", - "at", - "national", - "geographic", - ",", - "said", - "." - ], - [ - "\"", - "and", - "to", - "do", - "that", - ",", - "you", - "ca", - "n't", - "have", - "a", - "partner", - "that", - "'s", - "too", - "high", - "maintenance", - "." - ], - [ - "you", - "ca", - "n't", - "be", - "with", - "someone", - "who", - "needs", - "to", - "have", - "a", - "hairdryer", - ",", - "their", - "nails", - "done", - ",", - "a", - "shower", - "everyday", - "." - ], - [ - "\"", - "wendy", - "is", - "so", - "naturally", - "beautiful", - "she", - "does", - "n't", - "need", - "all", - "that", - "." - ], - [ - "she", - "just", - "loves", - "having", - "the", - "wind", - "in", - "her", - "hair", - "." - ], - [ - "and", - "being", - "near", - "the", - "water", - "is", - "one", - "of", - "the", - "most", - "important", - "things", - "in", - "her", - "life", - ".", - "\"" - ], - [ - "launched", - "in", - "2004", - ",", - "lovesail", - "now", - "has", - "around", - "5,500", - "users", - "ranging", - "from", - "professional", - "skippers", - "to", - "hobby", - "sailors", - "." - ], - [ - "as", - "the", - "name", - "suggests", - ",", - "most", - "are", - "looking", - "for", - "love", - "but", - "there", - "are", - "also", - "offers", - "of", - "friendship", - ",", - "sailing", - "trips", - "and", - "work", - "opportunities", - "." - ], - [ - "for", - "those", - "mariners", - "constantly", - "on", - "the", - "move", - ",", - "trying", - "to", - "find", - "a", - "partner", - "willing", - "to", - "wait", - "on", - "land", - "or", - "give", - "up", - "everything", - "to", - "jump", - "on", - "board", - "is", - "one", - "of", - "the", - "pitfalls", - "of", - "a", - "seemingly", - "idyllic", - "lifestyle", - "." - ], - [ - "\"", - "people", - "who", - "sail", - "tend", - "to", - "be", - "extremely", - "passionate", - "about", - "it", - "--", - "it", - "'s", - "a", - "big", - "investment", - ",", - "\"", - "lovesail", - "director", - "erica", - "joyce", - "said", - "." - ], - [ - "\"", - "but", - "it", - "can", - "be", - "difficult", - "for", - "sailors", - "because", - "they", - "'re", - "not", - "based", - "in", - "one", - "place", - ",", - "so", - "when", - "they", - "do", - "find", - "someone", - "they", - "often", - "have", - "to", - "leave", - "them", - ".", - "\"" - ], - [ - "it", - "'s", - "a", - "scenario", - "former", - "delivery", - "captain", - "tor", - "pinney", - "knows", - "well", - "." - ], - [ - "as", - "a", - "handsome", - "young", - "sailor", - "traveling", - "the", - "globe", - "in", - "the", - "1970s", - ",", - "pinney", - "had", - "little", - "problem", - "meeting", - "women", - "willing", - "to", - "show", - "him", - "around", - "their", - "home", - "town", - "or", - "even", - "set", - "sail", - "for", - "a", - "brief", - "adventure", - "on", - "the", - "high", - "seas", - "." - ], - [ - "but", - "rather", - "than", - "leading", - "to", - "a", - "long-lasting", - "relationship", - ",", - "it", - "was", - "more", - "often", - "a", - "case", - "of", - "ships", - "that", - "pass", - "in", - "the", - "night", - "as", - "pinney", - "'s", - "nomadic", - "lifestyle", - "made", - "it", - "difficult", - "to", - "rest", - "his", - "anchor", - "in", - "one", - "port", - "for", - "very", - "long", - "." - ], - [ - "now", - "64-years-old", - ",", - "pinney", - "'s", - "love", - "of", - "the", - "water", - "has", - "n't", - "waned", - "." - ], - [ - "and", - "neither", - "has", - "his", - "search", - "for", - "a", - "partner", - "willing", - "to", - "share", - "an", - "unconventional", - "life", - "on", - "the", - "waves", - "." - ], - [ - "\"", - "when", - "i", - "was", - "20", - "there", - "was", - "no", - "shortage", - "of", - "girls", - "who", - "wanted", - "to", - "share", - "this", - "experience", - "and", - "cruise", - "the", - "islands", - ",", - "\"", - "said", - "pinney", - ",", - "speaking", - "from", - "his", - "12", - "meter", - "yacht", - "in", - "st", - "john", - "'s", - "river", - ",", - "florida", - "." - ], - [ - "\"", - "but", - "as", - "people", - "get", - "older", - "they", - "seem", - "to", - "lose", - "that", - "adventurous", - "spirit", - "--", - "and", - "that", - "'s", - "changed", - "my", - "prospects", - ".", - "\"" - ], - [ - "pinney", - "also", - "signed", - "up", - "to", - "lovesail.com", - "in", - "the", - "hope", - "of", - "finding", - "that", - "special", - "lady", - "." - ], - [ - "he", - "'s", - "still", - "yet", - "to", - "find", - "her", - ",", - "admitting", - ":", - "\"", - "it", - "'s", - "difficult", - "to", - "hook", - "up", - "with", - "a", - "lovesail", - "girl", - "for", - "a", - "cup", - "of", - "coffee", - "when", - "i", - "'m", - "still", - "sailing", - "all", - "over", - "the", - "world", - ".", - "\"" - ], - [ - "online", - "dating", - "is", - "big", - "business", - "in", - "the", - "uk", - ",", - "with", - "more", - "than", - "9", - "million", - "people", - "logging", - "on", - "in", - "search", - "of", - "love", - "last", - "year", - ",", - "according", - "to", - "metaflake", - ",", - "a", - "company", - "that", - "reviews", - "internet", - "dating", - "sites", - "." - ], - [ - "it", - "'s", - "the", - "highest", - "number", - "in", - "europe", - ",", - "with", - "britain", - "now", - "claiming", - "1,500", - "of", - "the", - "continent", - "'s", - "5,000", - "dating", - "websites", - "." - ], - [ - "and", - "it", - "'s", - "continuing", - "to", - "grow", - ",", - "with", - "the", - "industry", - "turning", - "over", - "#", - "170", - "million", - "(", - "$", - "270", - "million", - ")", - "in", - "the", - "uk", - "--", - "a", - "6", - "%", - "rise", - "on", - "the", - "previous", - "year", - "." - ], - [ - "\"", - "it", - "'s", - "not", - "just", - "people", - "who", - "sail", - ",", - "everyone", - "has", - "busy", - "lives", - "now", - "and", - "you", - "do", - "n't", - "have", - "the", - "opportunity", - "to", - "meet", - "new", - "people", - ",", - "\"", - "mclaren-morris", - "said", - "." - ], - [ - "\"", - "five", - "years", - "ago", - ",", - "if", - "someone", - "had", - "told", - "me", - "they", - "were", - "doing", - "online", - "dating", - "my", - "reaction", - "would", - "have", - "been", - "`", - "you", - "silly", - "idiot", - ".", - "'" - ], - [ - "but", - "as", - "more", - "people", - "do", - "it", - ",", - "the", - "stigma", - "disappears", - ".", - "\"" - ], - [ - "for", - "pinney", - ",", - "the", - "joy", - "of", - "yachting", - "is", - "still", - "far", - "too", - "great", - "to", - "give", - "up", - "on", - "the", - "off-chance", - "it", - "will", - "help", - "him", - "find", - "love", - "." - ], - [ - "\"", - "it", - "'s", - "a", - "lifestyle", - "i", - "chose", - "when", - "i", - "was", - "16-years-old", - "and", - "obviously", - "it", - "presents", - "its", - "challenges", - ",", - "\"", - "he", - "said", - "." - ], - [ - "\"", - "but", - "it", - "'s", - "beautiful", - "out", - "here", - "." - ], - [ - "i", - "can", - "watch", - "osprey", - "and", - "fish", - "from", - "my", - "deck", - "and", - "manta", - "rays", - "dive", - "under", - "my", - "boat", - ".", - "\"" - ], - [ - "whether", - "he", - "'ll", - "one", - "day", - "share", - "that", - "beautiful", - "view", - "with", - "a", - "special", - "lady", - "remains", - "to", - "be", - "seen", - "." - ], - [ - "but", - "then", - ",", - "there", - "'s", - "always", - "plenty", - "more", - "fish", - "in", - "the", - "sea", - "." - ] - ], - "tgt": [ - [ - "for", - "sailors", - "traveling", - "the", - "globe", - ",", - "finding", - "a", - "longterm", - "partner", - "can", - "be", - "difficult" - ], - [ - "young", - "mariners", - "may", - "find", - "it", - "easier", - "to", - "meet", - "adventurous", - "companions" - ], - [ - "online", - "dating", - "site", - "lovesail.com", - "caters", - "to", - "sailing", - "enthusiasts", - "looking", - "for", - "love" - ], - [ - "increasing", - "number", - "of", - "britons", - "turning", - "to", - "internet", - "dating", - ",", - "highest", - "in", - "europe" - ] - ] - }, - { - "src": [ - [ - "(", - "rolling", - "stone", - ")", - "--", - "sinead", - "o'connor", - "has", - "gotten", - "back", - "together", - "with", - "husband", - "barry", - "herridge", - ",", - "only", - "days", - "after", - "announcing", - "plans", - "to", - "end", - "their", - "marriage", - "of", - "less", - "than", - "a", - "month", - "." - ], - [ - "o'connor", - "said", - "they", - "had", - "split", - "last", - "week", - "due", - "to", - "a", - "conflict", - "with", - "herridge", - "'s", - "family", - "." - ], - [ - "\"", - "spent", - "a", - "beautiful", - "evening", - "of", - "love", - "making", - "with", - "none", - "other", - "than", - "my", - "husband", - ",", - "\"", - "the", - "irish", - "rocker", - "wrote", - "on", - "her", - "website", - "." - ], - [ - "\"", - "we", - "decided", - "to", - "be", - "boyfriend", - "and", - "girlfriend", - "again", - "and", - "stay", - "married", - ",", - "but", - "we", - "did", - "rush", - "[", - "into", - "marriage", - "]", - ".", - "\"" - ], - [ - "o'connor", - "predicts", - "they", - "will", - "be", - "\"", - "sickeningly", - "happy", - "\"", - "together", - "and", - "says", - "she", - "plans", - "to", - "meet", - "with", - "a", - "marriage", - "counselor", - "." - ], - [ - "she", - "also", - "hopes", - "to", - "move", - "in", - "with", - "her", - "husband", - "\"", - "in", - "like", - "a", - "year", - ",", - "like", - "regular", - "people", - ".", - "\"" - ], - [ - "o'connor", - "married", - "herridge", - ",", - "her", - "fourth", - "husband", - ",", - "after", - "a", - "whirlwind", - "romance", - "." - ], - [ - "they", - "wed", - "on", - "her", - "45th", - "birthday", - "at", - "the", - "little", - "white", - "wedding", - "chapel", - "in", - "las", - "vegas", - "." - ], - [ - "earlier", - "this", - "year", - ",", - "the", - "singer", - "went", - "about", - "a", - "public", - "search", - "for", - "a", - "new", - "man", - "on", - "her", - "website", - ",", - "wrote", - "a", - "series", - "of", - "suicidal", - "tweets", - "that", - "alarmed", - "her", - "fans", - "and", - "revealed", - "plans", - "to", - "release", - "a", - "new", - "album", - "next", - "year", - "." - ], - [ - "see", - "the", - "full", - "article", - "at", - "rollingstone.com", - "." - ], - [ - "copyright", - "©", - "2011", - "rolling", - "stone", - "." - ] - ], - "tgt": [ - [ - "sinead", - "o'connor", - "said", - "they", - "had", - "split", - "last", - "week", - "due", - "to", - "a", - "conflict", - "with", - "barry", - "herridge", - "'s", - "family" - ], - [ - "\"", - "spent", - "a", - "beautiful", - "evening", - "of", - "love", - "making", - "with", - "none", - "other", - "than", - "my", - "husband", - ",", - "\"", - "the", - "rocker", - "wrote" - ], - [ - "\"", - "we", - "decided", - "to", - "be", - "boyfriend", - "and", - "girlfriend", - "again", - "and", - "stay", - "married", - ",", - "\"", - "she", - "said" - ] - ] - }, - { - "src": [ - [ - "by" - ], - [ - "tara", - "brady" - ], - [ - "published", - ":" - ], - [ - "13:16", - "est", - ",", - "31", - "january", - "2013" - ], - [ - "|" - ], - [ - "updated", - ":" - ], - [ - "14:49", - "est", - ",", - "31", - "january", - "2013" - ], - [ - "kian", - "mcmillan", - "was", - "just", - "four", - "months", - "old", - "when", - "he", - "died", - "after", - "a", - "five-stone", - "television", - "fell", - "on", - "his", - "head" - ], - [ - "a", - "woman", - "whose", - "four-month-old", - "son", - "died", - "when", - "she", - "knocked", - "a", - "five-stone", - "television", - "set", - "on", - "to", - "his", - "head", - "while", - "she", - "was", - "high", - "on", - "drink", - "and", - "drugs", - "has", - "been", - "jailed", - "for", - "15", - "months", - "." - ], - [ - "natalie", - "mcmillan", - ",", - "25", - ",", - "put", - "her", - "`", - "self-indulgent", - "drugs", - "lifestyle", - "'", - "ahead", - "of", - "the", - "welfare", - "of", - "her", - "son", - ",", - "kian", - ",", - "who", - "died", - "from", - "`", - "catastrophic", - "injuries", - "'", - ",", - "said", - "the", - "recorder", - "of", - "preston", - ",", - "judge", - "anthony", - "russell", - "qc", - "." - ], - [ - "the", - "baby", - "was", - "lying", - "on", - "his", - "changing", - "mat", - "at", - "the", - "family", - "home", - "in", - "burnley", - ",", - "lancashire", - ",", - "when", - "the", - "defendant", - "attempted", - "to", - "move", - "the", - "tv", - "to", - "plug", - "in", - "a", - "scart", - "lead", - "and", - "watch", - "a", - "dvd", - "." - ], - [ - "while", - "giving", - "evidence", - "at", - "her", - "trial", - "she", - "tried", - "to", - "shift", - "the", - "blame", - "to", - "the", - "boy", - "'s", - "father", - ",", - "her", - "ex-partner", - "edward", - "hanratty", - ",", - "41", - ",", - "and", - "said", - "she", - "was", - "upstairs", - "in", - "bed", - "at", - "the", - "time", - "." - ], - [ - "she", - "denied", - "she", - "had", - "been", - "under", - "the", - "influence", - "of", - "drugs", - "when", - "her", - "son", - "died", - "but", - "tests", - "later", - "showed", - "she", - "had", - "taken", - "heroin", - "and", - "valium", - "." - ], - [ - "hanratty", - "had", - "also", - "taken", - "drink", - "and", - "drugs", - "and", - "had", - "passed", - "out", - "on", - "the", - "kitchen", - "floor", - "at", - "their", - "address", - "in", - "scarlett", - "street", - "on", - "december", - "6", - ",", - "2011", - "." - ], - [ - "both", - "pleaded", - "guilty", - "to", - "child", - "cruelty", - "on", - "the", - "basis", - "of", - "neglect", - "during", - "their", - "trial", - "at", - "preston", - "crown", - "court", - "last", - "month", - "." - ], - [ - "mcmillan", - ",", - "of", - "clarendon", - "road", - ",", - "leeds", - ",", - "was", - "cleared", - "of", - "manslaughter", - "by", - "gross", - "negligence", - "but", - "judge", - "russell", - "said", - "today", - "that", - "he", - "was", - "satisfied", - "it", - "was", - "she", - "who", - "actually", - "moved", - "the", - "television", - "through", - "`", - "foolishness", - "'", - "." - ], - [ - "hanratty", - ",", - "of", - "dirkhill", - "road", - ",", - "bradford", - ",", - "failed", - "to", - "attend", - "for", - "his", - "sentencing", - "and", - "a", - "warrant", - "for", - "his", - "arrest", - "was", - "issued", - "." - ], - [ - "sentencing", - "mcmillan", - ",", - "the", - "judge", - "said", - ":", - "`", - "over", - "the", - "short", - "life", - "of", - "your", - "child", - "it", - "is", - "apparent", - "that", - "both", - "you", - "and", - "your", - "partner", - "gave", - "priority", - "to", - "your", - "selfish", - "and", - "self-indulgent", - "drugs", - "lifestyle", - "and", - "neglected", - "the", - "welfare", - "of", - "kian", - "." - ], - [ - "`", - "on", - "the", - "night", - "he", - "died", - ",", - "both", - "of", - "you", - "were", - "so", - "intoxicated", - "by", - "drugs", - "and", - "alcohol", - "that", - "you", - "probably", - "forgot", - "all", - "about", - "him", - "with", - "the", - "tragic", - "consequence", - "that", - "he", - "died", - ".", - "'" - ], - [ - "natalie", - "mcmillan", - "(", - "left", - ")", - "tried", - "to", - "shift", - "the", - "blame", - "to", - "the", - "boy", - "'s", - "father", - ",", - "her", - "ex-partner", - "edward", - "hanratty", - "(", - "right", - ")", - ",", - "claiming", - "she", - "was", - "upstairs", - "when", - "the", - "tv", - "fell", - "on", - "kian", - "who", - "was", - "just", - "four", - "months", - "old", - "when", - "he", - "died" - ], - [ - "the", - "judge", - "said", - "it", - "was", - "clear", - "that", - "mcmillan", - "had", - "been", - "concealing", - "the", - "extent", - "of", - "her", - "drug", - "addiction", - "from", - "social", - "services", - "and", - "health", - "teams", - "for", - "a", - "long", - "time", - "." - ], - [ - "she", - "also", - "hid", - "her", - "relationship", - "with", - "hanratty", - ",", - "who", - "was", - "known", - "to", - "social", - "services", - "for", - "previous", - "welfare", - "issues", - "with", - "other", - "children", - "." - ], - [ - "`", - "had", - "you", - "revealed", - "the", - "true", - "position", - ",", - "it", - "is", - "at", - "least", - "a", - "possibility", - "that", - "steps", - "would", - "have", - "been", - "taken", - "to", - "address", - "those", - "issues", - "and", - "that", - "kian", - "'s", - "welfare", - "might", - "have", - "been", - "better", - "safeguarded", - ",", - "'", - "said", - "judge", - "russell", - "." - ], - [ - "`", - "quite", - "remarkably", - "in", - "your", - "evidence", - ",", - "which", - "i", - "have", - "re-read", - ",", - "you", - "never", - "said", - "you", - "were", - "sorry", - "for", - "what", - "happened", - "." - ], - [ - "in", - "reality", - "there", - "is", - "no", - "mitigation", - "in", - "your", - "case", - ".", - "'" - ], - [ - "peter", - "wright", - "qc", - ",", - "defending", - ",", - "said", - ":", - "`", - "this", - "has", - "been", - "a", - "long", - "road", - "to", - "recovery", - "for", - "this", - "woman", - "and", - "it", - "is", - "indeed", - "one", - "that", - "continues", - "." - ], - [ - "`", - "there", - "is", - "the", - "expression", - "of", - "remorse", - "in", - "the", - "plea", - "tendered", - "." - ], - [ - "it", - "was", - "an", - "expression", - "which", - ",", - "we", - "submit", - ",", - "was", - "one", - "of", - "proper", - "remorse", - "when", - "free", - "of", - "drugs", - "and", - "on", - "mature", - "reflection", - "she", - "recognised", - "she", - "had", - "offended", - "in", - "this", - "form", - "and", - "recognises", - "she", - "needs", - "to", - "be", - "punished", - "." - ], - [ - "`", - "this", - "is", - "a", - "young", - "woman", - "who", - "is", - "emotionally", - "detached", - "." - ], - [ - "this", - "emotional", - "detachment", - "may", - "be", - "long", - "term", - "by", - "reason", - "of", - "her", - "own", - "life", - "by", - "what", - "occurred", - "in", - "infancy", - "and", - "subsequently", - "in", - "adolescence", - ".", - "'" - ], - [ - "he", - "added", - "mcmillan", - "had", - "made", - "`", - "considerable", - "improvement", - "'", - "since", - "descending", - "to", - "the", - "`", - "depths", - "of", - "the", - "spiral", - "of", - "drink", - "and", - "drugs", - "'", - "and", - "could", - "see", - "a", - "future", - "for", - "herself", - "." - ] - ], - "tgt": [ - [ - "baby", - "kian", - "was", - "lying", - "on", - "his", - "changing", - "mat", - "at", - "his", - "family", - "home", - "in", - "burnley", - ",", - "lancashire", - ",", - "when", - "the", - "tv", - "fell", - "on", - "his", - "head" - ], - [ - "while", - "giving", - "evidence", - "his", - "mother", - "natalie", - "mcmillan", - "tried", - "to", - "shift", - "the", - "blame", - "to", - "the", - "boy", - "'s", - "father", - "edward", - "hanratty" - ], - [ - "court", - "heard", - "both", - "parents", - "were", - "high", - "on", - "drugs", - "and", - "alcohol", - "the", - "night", - "their", - "baby", - "died" - ], - [ - "mcmillan", - "and", - "hanratty", - "pleaded", - "guilty", - "to", - "child", - "cruelty", - "on", - "the", - "basis", - "of", - "neglect" - ] - ] - } -] \ No newline at end of file diff --git a/src/MODEL_PATH/empty b/src/MODEL_PATH/empty new file mode 100644 index 00000000..e69de29b diff --git a/src/models/model_builder.py b/src/models/model_builder.py index 6b420e49..4b9b3979 100644 --- a/src/models/model_builder.py +++ b/src/models/model_builder.py @@ -116,9 +116,9 @@ class Bert(nn.Module): def __init__(self, large, temp_dir, finetune=False): super(Bert, self).__init__() if(large): - self.model = BertModel.from_pretrained('bert-large-uncased', cache_dir=temp_dir) + self.model = BertModel.from_pretrained('bert-base-multilingual-cased', cache_dir=temp_dir) else: - self.model = BertModel.from_pretrained('bert-base-uncased', cache_dir=temp_dir) + self.model = BertModel.from_pretrained('bert-base-multilingual-cased', cache_dir=temp_dir) self.finetune = finetune diff --git a/src/models/predictor.py b/src/models/predictor.py index dceac0f6..5a4ce021 100644 --- a/src/models/predictor.py +++ b/src/models/predictor.py @@ -151,7 +151,7 @@ def translate(self, for trans in translations: pred, gold, src = trans - pred_str = pred.replace('[unused0]', '').replace('[unused3]', '').replace('[PAD]', '').replace('[unused1]', '').replace(r' +', ' ').replace(' [unused2] ', '').replace('[unused2]', '').strip() + pred_str = pred.replace('[unused7]', '').replace('[unused3]', '').replace('[PAD]', '').replace('[unused1]', '').replace(r' +', ' ').replace(' [unused2] ', '').replace('[unused2]', '').strip() gold_str = gold.strip() if(self.args.recall_eval): _pred_str = '' diff --git a/src/others/tokenization.py b/src/others/tokenization.py index acb9d3e1..e8b27234 100644 --- a/src/others/tokenization.py +++ b/src/others/tokenization.py @@ -34,6 +34,7 @@ 'bert-base-multilingual-uncased': "https://s3.amazonaws.com/models.huggingface.co/bert/bert-base-multilingual-uncased-vocab.txt", 'bert-base-multilingual-cased': "https://s3.amazonaws.com/models.huggingface.co/bert/bert-base-multilingual-cased-vocab.txt", 'bert-base-chinese': "https://s3.amazonaws.com/models.huggingface.co/bert/bert-base-chinese-vocab.txt", + 'bert-base-japanese-whole-word-masking': 'https://s3.amazonaws.com/models.huggingface.co/bert/cl-tohoku/bert-base-japanese-whole-word-masking-vocab.txt' } PRETRAINED_VOCAB_POSITIONAL_EMBEDDINGS_SIZE_MAP = { 'bert-base-uncased': 512, @@ -43,6 +44,7 @@ 'bert-base-multilingual-uncased': 512, 'bert-base-multilingual-cased': 512, 'bert-base-chinese': 512, + 'bert-base-japanese-whole-word-masking': 512, } VOCAB_NAME = 'vocab.txt' @@ -75,7 +77,7 @@ class BertTokenizer(object): """Runs end-to-end tokenization: punctuation splitting + wordpiece""" def __init__(self, vocab_file, do_lower_case=True, max_len=None, - never_split=("[UNK]", "[SEP]", "[PAD]", "[CLS]", "[MASK]", "[unused0]", "[unused1]", "[unused2]", "[unused3]", "[unused4]", "[unused5]", "[unused6]")): + never_split=("[UNK]", "[SEP]", "[PAD]", "[CLS]", "[MASK]", "[unused7]", "[unused1]", "[unused2]", "[unused3]", "[unused4]", "[unused5]", "[unused6]")): if not os.path.isfile(vocab_file): raise ValueError( diff --git a/src/prepro/data_builder.py b/src/prepro/data_builder.py index bb7b30e3..ecba5aee 100644 --- a/src/prepro/data_builder.py +++ b/src/prepro/data_builder.py @@ -207,12 +207,12 @@ def hashhex(s): class BertData(): def __init__(self, args): self.args = args - self.tokenizer = BertTokenizer.from_pretrained('bert-base-uncased', do_lower_case=True) + self.tokenizer = BertTokenizer.from_pretrained('bert-base-multilingual-cased', do_lower_case=True) self.sep_token = '[SEP]' self.cls_token = '[CLS]' self.pad_token = '[PAD]' - self.tgt_bos = '[unused0]' + self.tgt_bos = '[unused7]' self.tgt_eos = '[unused1]' self.tgt_sent_split = '[unused2]' self.sep_vid = self.tokenizer.vocab[self.sep_token] @@ -258,7 +258,7 @@ def preprocess(self, src, tgt, sent_labels, use_bert_basic_tokenizer=False, is_t cls_ids = [i for i, t in enumerate(src_subtoken_idxs) if t == self.cls_vid] sent_labels = sent_labels[:len(cls_ids)] - tgt_subtokens_str = '[unused0] ' + ' [unused2] '.join( + tgt_subtokens_str = '[unused7] ' + ' [unused2] '.join( [' '.join(self.tokenizer.tokenize(' '.join(tt), use_bert_basic_tokenizer=use_bert_basic_tokenizer)) for tt in tgt]) + ' [unused1]' tgt_subtoken = tgt_subtokens_str.split()[:self.args.max_tgt_ntokens] if ((not is_test) and len(tgt_subtoken) < self.args.min_tgt_ntokens): @@ -281,14 +281,15 @@ def format_to_bert(args): a_lst = [] for json_f in glob.glob(pjoin(args.raw_path, '*' + corpus_type + '.*.json')): real_name = json_f.split('/')[-1] - a_lst.append((corpus_type, json_f, args, pjoin(args.save_path, real_name.replace('json', 'bert.pt')))) - print(a_lst) - pool = Pool(args.n_cpus) - for d in pool.imap(_format_to_bert, a_lst): - pass - - pool.close() - pool.join() + _format_to_bert((corpus_type, json_f, args, pjoin(args.save_path, real_name.replace('json', 'bert.pt')))) + # a_lst.append((corpus_type, json_f, args, pjoin(args.save_path, real_name.replace('json', 'bert.pt')))) + # print(a_lst) + # pool = Pool(args.n_cpus) + # for d in pool.imap(_format_to_bert, a_lst): + # pass + # + # pool.close() + # pool.join() def _format_to_bert(params): diff --git a/src/train_abstractive.py b/src/train_abstractive.py index 545efde3..212ed265 100644 --- a/src/train_abstractive.py +++ b/src/train_abstractive.py @@ -186,10 +186,9 @@ def validate(args, device_id, pt, step): args.batch_size, device, shuffle=False, is_test=False) - tokenizer = BertTokenizer.from_pretrained('bert-base-uncased', do_lower_case=True, cache_dir=args.temp_dir) - symbols = {'BOS': tokenizer.vocab['[unused0]'], 'EOS': tokenizer.vocab['[unused1]'], + tokenizer = BertTokenizer.from_pretrained('bert-base-multilingual-cased', do_lower_case=True, cache_dir=args.temp_dir) + symbols = {'BOS': tokenizer.vocab['[unused7]'], 'EOS': tokenizer.vocab['[unused1]'], 'PAD': tokenizer.vocab['[PAD]'], 'EOQ': tokenizer.vocab['[unused2]']} - valid_loss = abs_loss(model.generator, symbols, model.vocab_size, train=False, device=device) trainer = build_trainer(args, device_id, model, None, valid_loss) @@ -218,8 +217,8 @@ def test_abs(args, device_id, pt, step): test_iter = data_loader.Dataloader(args, load_dataset(args, 'test', shuffle=False), args.test_batch_size, device, shuffle=False, is_test=True) - tokenizer = BertTokenizer.from_pretrained('bert-base-uncased', do_lower_case=True, cache_dir=args.temp_dir) - symbols = {'BOS': tokenizer.vocab['[unused0]'], 'EOS': tokenizer.vocab['[unused1]'], + tokenizer = BertTokenizer.from_pretrained('bert-base-multilingual-cased', do_lower_case=True, cache_dir=args.temp_dir) + symbols = {'BOS': tokenizer.vocab['[unused7]'], 'EOS': tokenizer.vocab['[unused1]'], 'PAD': tokenizer.vocab['[PAD]'], 'EOQ': tokenizer.vocab['[unused2]']} predictor = build_predictor(args, tokenizer, symbols, model, logger) predictor.translate(test_iter, step) @@ -246,8 +245,8 @@ def test_text_abs(args, device_id, pt, step): test_iter = data_loader.Dataloader(args, load_dataset(args, 'test', shuffle=False), args.test_batch_size, device, shuffle=False, is_test=True) - tokenizer = BertTokenizer.from_pretrained('bert-base-uncased', do_lower_case=True, cache_dir=args.temp_dir) - symbols = {'BOS': tokenizer.vocab['[unused0]'], 'EOS': tokenizer.vocab['[unused1]'], + tokenizer = BertTokenizer.from_pretrained('bert-base-multilingual-cased', do_lower_case=True, cache_dir=args.temp_dir) + symbols = {'BOS': tokenizer.vocab['[unused7]'], 'EOS': tokenizer.vocab['[unused1]'], 'PAD': tokenizer.vocab['[PAD]'], 'EOQ': tokenizer.vocab['[unused2]']} predictor = build_predictor(args, tokenizer, symbols, model, logger) predictor.translate(test_iter, step) @@ -322,8 +321,8 @@ def train_iter_fct(): logger.info(model) - tokenizer = BertTokenizer.from_pretrained('bert-base-uncased', do_lower_case=True, cache_dir=args.temp_dir) - symbols = {'BOS': tokenizer.vocab['[unused0]'], 'EOS': tokenizer.vocab['[unused1]'], + tokenizer = BertTokenizer.from_pretrained('bert-base-multilingual-cased', do_lower_case=True, cache_dir=args.temp_dir) + symbols = {'BOS': tokenizer.vocab['[unused7]'], 'EOS': tokenizer.vocab['[unused1]'], 'PAD': tokenizer.vocab['[PAD]'], 'EOQ': tokenizer.vocab['[unused2]']} train_loss = abs_loss(model.generator, symbols, model.vocab_size, device, train=True,