Skip to content

Commit

Permalink
Update and rerun notebooks under tutorials/corpus
Browse files Browse the repository at this point in the history
  • Loading branch information
frreiss committed Feb 24, 2021
1 parent 98dc855 commit cbc0d2b
Show file tree
Hide file tree
Showing 5 changed files with 2,211 additions and 1,640 deletions.
29 changes: 13 additions & 16 deletions tutorials/corpus/CoNLL_2.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2543,9 +2543,7 @@
" pd.DataFrame({\n",
" \"fold\": k[0], # Keys are (collection, offset) tuples\n",
" \"doc_offset\": k[1],\n",
" # TokenSpanArrays from different documents can't currently be stacked,\n",
" # so convert to TokenSpan objects.\n",
" \"span\" : indicators[k][\"span\"].astype(object),\n",
" \"span\" : indicators[k][\"span\"],\n",
" \"ent_type\": indicators[k][\"ent_type\"],\n",
" \"gold\": indicators[k][\"gold\"],\n",
" \"num_teams\": indicators[k][\"num_teams\"]\n",
Expand Down Expand Up @@ -3730,10 +3728,10 @@
"data": {
"text/html": [
"\n",
" <div id=\"spanArray\">\n",
" <div id=\"spans\" \n",
" style=\"background-color:#F0F0F0; border: 1px solid #E0E0E0; float:left; padding:10px;\">\n",
" <table border=\"1\" class=\"dataframe\">\n",
"<div id=\"spanArray\">\n",
" <div id=\"spans\" \n",
" style=\"background-color:#F0F0F0; border: 1px solid #E0E0E0; float:left; padding:10px;\">\n",
" <table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
Expand Down Expand Up @@ -3899,17 +3897,18 @@
" </tr>\n",
" </tbody>\n",
"</table>\n",
" </div>\n",
" <div id=\"text\"\n",
" style=\"float:right; background-color:#F5F5F5; border: 1px solid #E0E0E0; width: 60%;\">\n",
" </div>\n",
" <div id=\"text\"\n",
" style=\"float:right; background-color:#F5F5F5; border: 1px solid #E0E0E0; width: 60%;\">\n",
"\n",
" <div style=\"float:center; padding:10px\">\n",
" <p style=\"font-family:monospace\">\n",
" -DOCSTART-<br><span style=\"background-color:yellow\">Belgian</span> police smash major drugs rings, 30 arrested.<br><span style=\"background-color:yellow\">BRUSSELS</span> 1996-12-06<br>Police smashed two drugs smuggling rings and arrested 30 people after a taxidriver in <span style=\"background-color:yellow\">Spain</span> alerted them to a suitcase of heroin left in his cab, <span style=\"background-color:yellow\">Belgian</span> police said on Friday.<br>Police seized dozens of kilos of heroin with a street value of hundreds of millions of <span style=\"background-color:yellow\">Belgian</span> francs, a public prosecutor&#39;s office spokesman in the port city of <span style=\"background-color:yellow\">Antwerp</span> said.<br>He said a 24-year-old <span style=\"background-color:yellow\">Belgian</span> woman left a suitcase containing 13 kg (29 lb) of heroin in a taxi in <span style=\"background-color:yellow\">Barcelona</span>.<br>The taxidriver alerted police who arrested a 33-year-old <span style=\"background-color:yellow\">Turkish</span> man when he came to pick up the suitcase at a lost luggage office.<br>The woman was later arrested in <span style=\"background-color:yellow\">Belgium</span>.<br>She and the <span style=\"background-color:yellow\">Turkish</span> man smuggled heroin from <span style=\"background-color:yellow\">Turkey</span> to <span style=\"background-color:yellow\">Antwerp</span> from where it was taken to <span style=\"background-color:yellow\">Spain</span>, <span style=\"background-color:yellow\">France</span> and <span style=\"background-color:yellow\">Germany</span> by others, the spokesman said.<br>He said 14 people were arrested in <span style=\"background-color:yellow\">Belgium</span> and 16 others in other <span style=\"background-color:yellow\">European</span> nations after an investigation lasting nearly a year.<br>(<span>&#36;</span>1=32.14 <span style=\"background-color:yellow\">Belgian</span> Franc)\n",
" </p>\n",
" </div>\n",
" </div>\n",
" </div>\n",
" "
"\n",
" </div>\n",
"</div>\n"
],
"text/plain": [
"<TokenSpanArray>\n",
Expand Down Expand Up @@ -3986,9 +3985,7 @@
" pd.DataFrame({\n",
" \"fold\": k[0], # Keys are (collection, offset) tuples\n",
" \"doc_offset\": k[1],\n",
" # TokenSpanArrays from different documents can't currently be stacked,\n",
" # so convert to TokenSpan objects.\n",
" \"span\" : dev_indicators[k][\"span\"].astype(object),\n",
" \"span\" : dev_indicators[k][\"span\"],\n",
" \"ent_type\": dev_indicators[k][\"ent_type\"],\n",
" \"gold\": dev_indicators[k][\"gold\"],\n",
" \"num_teams\": dev_indicators[k][\"num_teams\"]\n",
Expand Down
Loading

0 comments on commit cbc0d2b

Please sign in to comment.