Appendix A typos
- forgot to change train, valid and test to train_data, valid_data and test_data
This commit is contained in:
parent
61bf7da1d0
commit
ecbfa2e469
@ -28,9 +28,9 @@
|
||||
"TEXT = data.Field()\n",
|
||||
"LABEL = data.LabelField()\n",
|
||||
"\n",
|
||||
"train, test = datasets.IMDB.splits(TEXT, LABEL)\n",
|
||||
"train_data, test_data = datasets.IMDB.splits(TEXT, LABEL)\n",
|
||||
"\n",
|
||||
"train, valid = train.split()"
|
||||
"train_data, valid_data = train_data.split()"
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -173,12 +173,12 @@
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"{'text': ['I', 'simply', 'cannot', 'believe', 'the', 'number', 'of', 'people', 'comparing', 'this', 'favourably', 'with', 'the', 'first', 'film.', 'It', 'moved', 'me', 'to', 'leave', 'this', 'comment!', 'This', 'is', 'just', 'an', 'obvious', 'attempt', 'to', 'cash-in', 'on', 'the', 'success', 'of', 'the', 'first', 'film.', 'The', 'dialogue', 'is', 'appalling', 'and', 'nothing', 'like', 'as', 'authentic', 'or', 'compelling', 'as', 'the', 'original', 'film.<br', '/><br', '/>The', 'storyline', 'is', 'ridiculous,', 'the', 'portrayal', 'of', 'the', 'French', 'police', 'laughable', 'and', 'the', 'characterisation', 'of', 'Doyle', 'a', 'mile', 'away', 'from', 'the', 'first', 'film.<br', '/><br', '/>How', 'many', 'drug', 'bosses', 'do', 'you', 'think', 'go', 'down', 'to', 'the', 'docks', 'in', 'person', 'to', 'see', 'a', 'shipment', 'come', 'in?', 'The', 'ease', 'at', 'which', 'Doyle', 'finds', 'his', 'guy', 'is', 'just', 'pathetic.', 'Like', 'all', 'the', 'French', 'Police', 'were', 'just', 'drinking', 'coffee', 'until', 'Doyle', 'turns', 'up', 'from', 'America', 'and', 'does', 'some', 'REAL', 'police', 'work.', 'What', 'a', 'joke.', 'Try', 'going', 'to', 'a', 'foreign', 'city', 'and', 'unearthing', 'the', 'biggest', 'crims', 'in', 'the', 'place', 'with', 'a', 'travel', 'map', 'and', 'some', 'tourist', 'pamphlets.', 'Pathetic.', '<br', '/><br', '/>A', 'truly', 'awful', 'sequel,', 'anyone', 'who', 'thinks', 'otherwise', 'is', 'crazy.'], 'label': 'neg'}\n"
|
||||
"{'n': ['John'], 'p': ['United', 'Kingdom'], 's': ['i', 'love', 'the', 'united kingdom']}\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"print(vars(train[0]))"
|
||||
"print(vars(train_data[0]))"
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -249,12 +249,12 @@
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"{'text': ['I', 'simply', 'cannot', 'believe', 'the', 'number', 'of', 'people', 'comparing', 'this', 'favourably', 'with', 'the', 'first', 'film.', 'It', 'moved', 'me', 'to', 'leave', 'this', 'comment!', 'This', 'is', 'just', 'an', 'obvious', 'attempt', 'to', 'cash-in', 'on', 'the', 'success', 'of', 'the', 'first', 'film.', 'The', 'dialogue', 'is', 'appalling', 'and', 'nothing', 'like', 'as', 'authentic', 'or', 'compelling', 'as', 'the', 'original', 'film.<br', '/><br', '/>The', 'storyline', 'is', 'ridiculous,', 'the', 'portrayal', 'of', 'the', 'French', 'police', 'laughable', 'and', 'the', 'characterisation', 'of', 'Doyle', 'a', 'mile', 'away', 'from', 'the', 'first', 'film.<br', '/><br', '/>How', 'many', 'drug', 'bosses', 'do', 'you', 'think', 'go', 'down', 'to', 'the', 'docks', 'in', 'person', 'to', 'see', 'a', 'shipment', 'come', 'in?', 'The', 'ease', 'at', 'which', 'Doyle', 'finds', 'his', 'guy', 'is', 'just', 'pathetic.', 'Like', 'all', 'the', 'French', 'Police', 'were', 'just', 'drinking', 'coffee', 'until', 'Doyle', 'turns', 'up', 'from', 'America', 'and', 'does', 'some', 'REAL', 'police', 'work.', 'What', 'a', 'joke.', 'Try', 'going', 'to', 'a', 'foreign', 'city', 'and', 'unearthing', 'the', 'biggest', 'crims', 'in', 'the', 'place', 'with', 'a', 'travel', 'map', 'and', 'some', 'tourist', 'pamphlets.', 'Pathetic.', '<br', '/><br', '/>A', 'truly', 'awful', 'sequel,', 'anyone', 'who', 'thinks', 'otherwise', 'is', 'crazy.'], 'label': 'neg'}\n"
|
||||
"{'n': ['John'], 'p': ['United', 'Kingdom'], 's': ['i', 'love', 'the', 'united', 'kingdom']}\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"print(vars(train[0]))"
|
||||
"print(vars(train_data[0]))"
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -301,12 +301,12 @@
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"{'text': ['I', 'simply', 'cannot', 'believe', 'the', 'number', 'of', 'people', 'comparing', 'this', 'favourably', 'with', 'the', 'first', 'film.', 'It', 'moved', 'me', 'to', 'leave', 'this', 'comment!', 'This', 'is', 'just', 'an', 'obvious', 'attempt', 'to', 'cash-in', 'on', 'the', 'success', 'of', 'the', 'first', 'film.', 'The', 'dialogue', 'is', 'appalling', 'and', 'nothing', 'like', 'as', 'authentic', 'or', 'compelling', 'as', 'the', 'original', 'film.<br', '/><br', '/>The', 'storyline', 'is', 'ridiculous,', 'the', 'portrayal', 'of', 'the', 'French', 'police', 'laughable', 'and', 'the', 'characterisation', 'of', 'Doyle', 'a', 'mile', 'away', 'from', 'the', 'first', 'film.<br', '/><br', '/>How', 'many', 'drug', 'bosses', 'do', 'you', 'think', 'go', 'down', 'to', 'the', 'docks', 'in', 'person', 'to', 'see', 'a', 'shipment', 'come', 'in?', 'The', 'ease', 'at', 'which', 'Doyle', 'finds', 'his', 'guy', 'is', 'just', 'pathetic.', 'Like', 'all', 'the', 'French', 'Police', 'were', 'just', 'drinking', 'coffee', 'until', 'Doyle', 'turns', 'up', 'from', 'America', 'and', 'does', 'some', 'REAL', 'police', 'work.', 'What', 'a', 'joke.', 'Try', 'going', 'to', 'a', 'foreign', 'city', 'and', 'unearthing', 'the', 'biggest', 'crims', 'in', 'the', 'place', 'with', 'a', 'travel', 'map', 'and', 'some', 'tourist', 'pamphlets.', 'Pathetic.', '<br', '/><br', '/>A', 'truly', 'awful', 'sequel,', 'anyone', 'who', 'thinks', 'otherwise', 'is', 'crazy.'], 'label': 'neg'}\n"
|
||||
"{'n': ['John'], 'p': ['United', 'Kingdom'], 's': ['i', 'love', 'the', 'united', 'kingdom']}\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"print(vars(train[0]))"
|
||||
"print(vars(train_data[0]))"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user