Import matplotlib in a good place
This commit is contained in:
parent
eb754a30e5
commit
70fb848e2a
|
@ -3,7 +3,6 @@ import unicodedata
|
||||||
import sys
|
import sys
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
from matplotlib import pyplot as plt
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
|
||||||
SHINGLE_SIZE = 5 # Known as k
|
SHINGLE_SIZE = 5 # Known as k
|
||||||
|
@ -331,6 +330,8 @@ def graph(stream, display_tqdm: bool = False) -> None:
|
||||||
"""
|
"""
|
||||||
Draw statistic graphs about false-positive and true positive rates using matplotlib.
|
Draw statistic graphs about false-positive and true positive rates using matplotlib.
|
||||||
"""
|
"""
|
||||||
|
from matplotlib import pyplot as plt
|
||||||
|
|
||||||
docs = [line.rstrip('\n') for line in stream] # Read stream
|
docs = [line.rstrip('\n') for line in stream] # Read stream
|
||||||
docs = [normalize(doc) for doc in docs] # Remove special characters and normalize accents
|
docs = [normalize(doc) for doc in docs] # Remove special characters and normalize accents
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue