文本加标点--训练BLSTM
bert4keras==0.5.9
代码语言:javascript复制# -*- coding:utf-8 -*-
import os
import re
import sys
import time
import jieba
import gensim
import logging
import numpy as np
import pandas as pd
from tqdm import tqdm
import multiprocessing
from bert4keras.snippets import sequence_padding, DataGenerator
from bert4keras.optimizers import Adam
import warnings
warnings.filterwarnings(action='ignore', category=UserWarning, module='gensim')# 忽略警告
np.random.seed(2019)
import keras
from keras.models import *
from keras.layers import *
from keras.optimizers import *
from keras.regularizers import l2
from keras.callbacks import *
from keras.optimizers import *
from keras.callbacks import *
from keras import backend as K
from keras.layers import *
from bert4keras.backend import keras, set_gelu
from bert4keras.bert import build_bert_model
from bert4keras.optimizers import Adam
from bert4keras.snippets import seq