18 lines
365 B
Python
Executable File
18 lines
365 B
Python
Executable File
#!/usr/bin/env python3
|
|
import os
|
|
import shutil
|
|
from pathlib import Path
|
|
|
|
import nltk
|
|
|
|
script_dir = Path(os.path.dirname(os.path.realpath(__file__)))
|
|
target = script_dir / 'punkt'
|
|
print('Target directory:', target)
|
|
|
|
|
|
print('Erasing old install...')
|
|
shutil.rmtree(target, ignore_errors=True)
|
|
|
|
print('Downloading punkt...')
|
|
nltk.download('punkt', download_dir=target)
|