mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-26 01:46:28 +03:00
* Shuffle docs before doing jackknife partition --- otherwise we'll not get the right genre mixes...
This commit is contained in:
parent
4d8d490547
commit
d42dda0372
|
@ -81,6 +81,7 @@ def get_train_tags(Language, model_dir, docs, gold_preproc):
|
|||
return taggings
|
||||
|
||||
def get_partitions(docs, n_parts):
|
||||
random.shuffle(docs)
|
||||
n_test = len(docs) / n_parts
|
||||
n_train = len(docs) - n_test
|
||||
for part in range(n_parts):
|
||||
|
|
Loading…
Reference in New Issue
Block a user