Skip to content

Instantly share code, notes, and snippets.

View suicao's full-sized avatar

Khoi Nguyen suicao

View GitHub Profile
@suicao
suicao / clean_test.py
Created May 2, 2019 13:02
Clean file test cho contest thêm dấu tiếng Việt
from tqdm import tqdm
input_path = "./test_word_per_line.txt"
output_path = "./test_cleaned.txt"
curr_id = ""
curr_sent = []
with open(output_path,mode="wt", encoding="utf-8") as f:
lines = open(input_path).readlines()
for idx, line in tqdm(enumerate(lines)):
if idx == 0:
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt
from matplotlib import cm
from matplotlib.ticker import LinearLocator
import numpy as np
fig = plt.figure()
ax = fig.gca(projection='3d')
{
"corpus": [
{
"words": [
{
"pos": "N",
"text": "Căn_cứ"
},
{
"pos": "N",