This commit is contained in:
rcell
2023-07-21 12:12:35 +08:00
parent ae26c0d657
commit 3604247c92
34 changed files with 134640 additions and 0 deletions

303
attentions.py Normal file
View File

@@ -0,0 +1,303 @@
import copy
import math
import numpy as np
import torch
from torch import nn
from torch.nn import functional as F
import commons
import modules
from modules import LayerNorm
class Encoder(nn.Module):
def __init__(self, hidden_channels, filter_channels, n_heads, n_layers, kernel_size=1, p_dropout=0., window_size=4, **kwargs):
super().__init__()
self.hidden_channels = hidden_channels
self.filter_channels = filter_channels
self.n_heads = n_heads
self.n_layers = n_layers
self.kernel_size = kernel_size
self.p_dropout = p_dropout
self.window_size = window_size
self.drop = nn.Dropout(p_dropout)
self.attn_layers = nn.ModuleList()
self.norm_layers_1 = nn.ModuleList()
self.ffn_layers = nn.ModuleList()
self.norm_layers_2 = nn.ModuleList()
for i in range(self.n_layers):
self.attn_layers.append(MultiHeadAttention(hidden_channels, hidden_channels, n_heads, p_dropout=p_dropout, window_size=window_size))
self.norm_layers_1.append(LayerNorm(hidden_channels))
self.ffn_layers.append(FFN(hidden_channels, hidden_channels, filter_channels, kernel_size, p_dropout=p_dropout))
self.norm_layers_2.append(LayerNorm(hidden_channels))
def forward(self, x, x_mask):
attn_mask = x_mask.unsqueeze(2) * x_mask.unsqueeze(-1)
x = x * x_mask
for i in range(self.n_layers):
y = self.attn_layers[i](x, x, attn_mask)
y = self.drop(y)
x = self.norm_layers_1[i](x + y)
y = self.ffn_layers[i](x, x_mask)
y = self.drop(y)
x = self.norm_layers_2[i](x + y)
x = x * x_mask
return x
class Decoder(nn.Module):
def __init__(self, hidden_channels, filter_channels, n_heads, n_layers, kernel_size=1, p_dropout=0., proximal_bias=False, proximal_init=True, **kwargs):
super().__init__()
self.hidden_channels = hidden_channels
self.filter_channels = filter_channels
self.n_heads = n_heads
self.n_layers = n_layers
self.kernel_size = kernel_size
self.p_dropout = p_dropout
self.proximal_bias = proximal_bias
self.proximal_init = proximal_init
self.drop = nn.Dropout(p_dropout)
self.self_attn_layers = nn.ModuleList()
self.norm_layers_0 = nn.ModuleList()
self.encdec_attn_layers = nn.ModuleList()
self.norm_layers_1 = nn.ModuleList()
self.ffn_layers = nn.ModuleList()
self.norm_layers_2 = nn.ModuleList()
for i in range(self.n_layers):
self.self_attn_layers.append(MultiHeadAttention(hidden_channels, hidden_channels, n_heads, p_dropout=p_dropout, proximal_bias=proximal_bias, proximal_init=proximal_init))
self.norm_layers_0.append(LayerNorm(hidden_channels))
self.encdec_attn_layers.append(MultiHeadAttention(hidden_channels, hidden_channels, n_heads, p_dropout=p_dropout))
self.norm_layers_1.append(LayerNorm(hidden_channels))
self.ffn_layers.append(FFN(hidden_channels, hidden_channels, filter_channels, kernel_size, p_dropout=p_dropout, causal=True))
self.norm_layers_2.append(LayerNorm(hidden_channels))
def forward(self, x, x_mask, h, h_mask):
"""
x: decoder input
h: encoder output
"""
self_attn_mask = commons.subsequent_mask(x_mask.size(2)).to(device=x.device, dtype=x.dtype)
encdec_attn_mask = h_mask.unsqueeze(2) * x_mask.unsqueeze(-1)
x = x * x_mask
for i in range(self.n_layers):
y = self.self_attn_layers[i](x, x, self_attn_mask)
y = self.drop(y)
x = self.norm_layers_0[i](x + y)
y = self.encdec_attn_layers[i](x, h, encdec_attn_mask)
y = self.drop(y)
x = self.norm_layers_1[i](x + y)
y = self.ffn_layers[i](x, x_mask)
y = self.drop(y)
x = self.norm_layers_2[i](x + y)
x = x * x_mask
return x
class MultiHeadAttention(nn.Module):
def __init__(self, channels, out_channels, n_heads, p_dropout=0., window_size=None, heads_share=True, block_length=None, proximal_bias=False, proximal_init=False):
super().__init__()
assert channels % n_heads == 0
self.channels = channels
self.out_channels = out_channels
self.n_heads = n_heads
self.p_dropout = p_dropout
self.window_size = window_size
self.heads_share = heads_share
self.block_length = block_length
self.proximal_bias = proximal_bias
self.proximal_init = proximal_init
self.attn = None
self.k_channels = channels // n_heads
self.conv_q = nn.Conv1d(channels, channels, 1)
self.conv_k = nn.Conv1d(channels, channels, 1)
self.conv_v = nn.Conv1d(channels, channels, 1)
self.conv_o = nn.Conv1d(channels, out_channels, 1)
self.drop = nn.Dropout(p_dropout)
if window_size is not None:
n_heads_rel = 1 if heads_share else n_heads
rel_stddev = self.k_channels**-0.5
self.emb_rel_k = nn.Parameter(torch.randn(n_heads_rel, window_size * 2 + 1, self.k_channels) * rel_stddev)
self.emb_rel_v = nn.Parameter(torch.randn(n_heads_rel, window_size * 2 + 1, self.k_channels) * rel_stddev)
nn.init.xavier_uniform_(self.conv_q.weight)
nn.init.xavier_uniform_(self.conv_k.weight)
nn.init.xavier_uniform_(self.conv_v.weight)
if proximal_init:
with torch.no_grad():
self.conv_k.weight.copy_(self.conv_q.weight)
self.conv_k.bias.copy_(self.conv_q.bias)
def forward(self, x, c, attn_mask=None):
q = self.conv_q(x)
k = self.conv_k(c)
v = self.conv_v(c)
x, self.attn = self.attention(q, k, v, mask=attn_mask)
x = self.conv_o(x)
return x
def attention(self, query, key, value, mask=None):
# reshape [b, d, t] -> [b, n_h, t, d_k]
b, d, t_s, t_t = (*key.size(), query.size(2))
query = query.view(b, self.n_heads, self.k_channels, t_t).transpose(2, 3)
key = key.view(b, self.n_heads, self.k_channels, t_s).transpose(2, 3)
value = value.view(b, self.n_heads, self.k_channels, t_s).transpose(2, 3)
scores = torch.matmul(query / math.sqrt(self.k_channels), key.transpose(-2, -1))
if self.window_size is not None:
assert t_s == t_t, "Relative attention is only available for self-attention."
key_relative_embeddings = self._get_relative_embeddings(self.emb_rel_k, t_s)
rel_logits = self._matmul_with_relative_keys(query /math.sqrt(self.k_channels), key_relative_embeddings)
scores_local = self._relative_position_to_absolute_position(rel_logits)
scores = scores + scores_local
if self.proximal_bias:
assert t_s == t_t, "Proximal bias is only available for self-attention."
scores = scores + self._attention_bias_proximal(t_s).to(device=scores.device, dtype=scores.dtype)
if mask is not None:
scores = scores.masked_fill(mask == 0, -1e4)
if self.block_length is not None:
assert t_s == t_t, "Local attention is only available for self-attention."
block_mask = torch.ones_like(scores).triu(-self.block_length).tril(self.block_length)
scores = scores.masked_fill(block_mask == 0, -1e4)
p_attn = F.softmax(scores, dim=-1) # [b, n_h, t_t, t_s]
p_attn = self.drop(p_attn)
output = torch.matmul(p_attn, value)
if self.window_size is not None:
relative_weights = self._absolute_position_to_relative_position(p_attn)
value_relative_embeddings = self._get_relative_embeddings(self.emb_rel_v, t_s)
output = output + self._matmul_with_relative_values(relative_weights, value_relative_embeddings)
output = output.transpose(2, 3).contiguous().view(b, d, t_t) # [b, n_h, t_t, d_k] -> [b, d, t_t]
return output, p_attn
def _matmul_with_relative_values(self, x, y):
"""
x: [b, h, l, m]
y: [h or 1, m, d]
ret: [b, h, l, d]
"""
ret = torch.matmul(x, y.unsqueeze(0))
return ret
def _matmul_with_relative_keys(self, x, y):
"""
x: [b, h, l, d]
y: [h or 1, m, d]
ret: [b, h, l, m]
"""
ret = torch.matmul(x, y.unsqueeze(0).transpose(-2, -1))
return ret
def _get_relative_embeddings(self, relative_embeddings, length):
max_relative_position = 2 * self.window_size + 1
# Pad first before slice to avoid using cond ops.
pad_length = max(length - (self.window_size + 1), 0)
slice_start_position = max((self.window_size + 1) - length, 0)
slice_end_position = slice_start_position + 2 * length - 1
if pad_length > 0:
padded_relative_embeddings = F.pad(
relative_embeddings,
commons.convert_pad_shape([[0, 0], [pad_length, pad_length], [0, 0]]))
else:
padded_relative_embeddings = relative_embeddings
used_relative_embeddings = padded_relative_embeddings[:,slice_start_position:slice_end_position]
return used_relative_embeddings
def _relative_position_to_absolute_position(self, x):
"""
x: [b, h, l, 2*l-1]
ret: [b, h, l, l]
"""
batch, heads, length, _ = x.size()
# Concat columns of pad to shift from relative to absolute indexing.
x = F.pad(x, commons.convert_pad_shape([[0,0],[0,0],[0,0],[0,1]]))
# Concat extra elements so to add up to shape (len+1, 2*len-1).
x_flat = x.view([batch, heads, length * 2 * length])
x_flat = F.pad(x_flat, commons.convert_pad_shape([[0,0],[0,0],[0,length-1]]))
# Reshape and slice out the padded elements.
x_final = x_flat.view([batch, heads, length+1, 2*length-1])[:, :, :length, length-1:]
return x_final
def _absolute_position_to_relative_position(self, x):
"""
x: [b, h, l, l]
ret: [b, h, l, 2*l-1]
"""
batch, heads, length, _ = x.size()
# padd along column
x = F.pad(x, commons.convert_pad_shape([[0, 0], [0, 0], [0, 0], [0, length-1]]))
x_flat = x.view([batch, heads, length**2 + length*(length -1)])
# add 0's in the beginning that will skew the elements after reshape
x_flat = F.pad(x_flat, commons.convert_pad_shape([[0, 0], [0, 0], [length, 0]]))
x_final = x_flat.view([batch, heads, length, 2*length])[:,:,:,1:]
return x_final
def _attention_bias_proximal(self, length):
"""Bias for self-attention to encourage attention to close positions.
Args:
length: an integer scalar.
Returns:
a Tensor with shape [1, 1, length, length]
"""
r = torch.arange(length, dtype=torch.float32)
diff = torch.unsqueeze(r, 0) - torch.unsqueeze(r, 1)
return torch.unsqueeze(torch.unsqueeze(-torch.log1p(torch.abs(diff)), 0), 0)
class FFN(nn.Module):
def __init__(self, in_channels, out_channels, filter_channels, kernel_size, p_dropout=0., activation=None, causal=False):
super().__init__()
self.in_channels = in_channels
self.out_channels = out_channels
self.filter_channels = filter_channels
self.kernel_size = kernel_size
self.p_dropout = p_dropout
self.activation = activation
self.causal = causal
if causal:
self.padding = self._causal_padding
else:
self.padding = self._same_padding
self.conv_1 = nn.Conv1d(in_channels, filter_channels, kernel_size)
self.conv_2 = nn.Conv1d(filter_channels, out_channels, kernel_size)
self.drop = nn.Dropout(p_dropout)
def forward(self, x, x_mask):
x = self.conv_1(self.padding(x * x_mask))
if self.activation == "gelu":
x = x * torch.sigmoid(1.702 * x)
else:
x = torch.relu(x)
x = self.drop(x)
x = self.conv_2(self.padding(x * x_mask))
return x * x_mask
def _causal_padding(self, x):
if self.kernel_size == 1:
return x
pad_l = self.kernel_size - 1
pad_r = 0
padding = [[0, 0], [0, 0], [pad_l, pad_r]]
x = F.pad(x, commons.convert_pad_shape(padding))
return x
def _same_padding(self, x):
if self.kernel_size == 1:
return x
pad_l = (self.kernel_size - 1) // 2
pad_r = self.kernel_size // 2
padding = [[0, 0], [0, 0], [pad_l, pad_r]]
x = F.pad(x, commons.convert_pad_shape(padding))
return x

161
commons.py Normal file
View File

@@ -0,0 +1,161 @@
import math
import numpy as np
import torch
from torch import nn
from torch.nn import functional as F
def init_weights(m, mean=0.0, std=0.01):
classname = m.__class__.__name__
if classname.find("Conv") != -1:
m.weight.data.normal_(mean, std)
def get_padding(kernel_size, dilation=1):
return int((kernel_size*dilation - dilation)/2)
def convert_pad_shape(pad_shape):
l = pad_shape[::-1]
pad_shape = [item for sublist in l for item in sublist]
return pad_shape
def intersperse(lst, item):
result = [item] * (len(lst) * 2 + 1)
result[1::2] = lst
return result
def kl_divergence(m_p, logs_p, m_q, logs_q):
"""KL(P||Q)"""
kl = (logs_q - logs_p) - 0.5
kl += 0.5 * (torch.exp(2. * logs_p) + ((m_p - m_q)**2)) * torch.exp(-2. * logs_q)
return kl
def rand_gumbel(shape):
"""Sample from the Gumbel distribution, protect from overflows."""
uniform_samples = torch.rand(shape) * 0.99998 + 0.00001
return -torch.log(-torch.log(uniform_samples))
def rand_gumbel_like(x):
g = rand_gumbel(x.size()).to(dtype=x.dtype, device=x.device)
return g
def slice_segments(x, ids_str, segment_size=4):
ret = torch.zeros_like(x[:, :, :segment_size])
for i in range(x.size(0)):
idx_str = ids_str[i]
idx_end = idx_str + segment_size
ret[i] = x[i, :, idx_str:idx_end]
return ret
def rand_slice_segments(x, x_lengths=None, segment_size=4):
b, d, t = x.size()
if x_lengths is None:
x_lengths = t
ids_str_max = x_lengths - segment_size + 1
ids_str = (torch.rand([b]).to(device=x.device) * ids_str_max).to(dtype=torch.long)
ret = slice_segments(x, ids_str, segment_size)
return ret, ids_str
def get_timing_signal_1d(
length, channels, min_timescale=1.0, max_timescale=1.0e4):
position = torch.arange(length, dtype=torch.float)
num_timescales = channels // 2
log_timescale_increment = (
math.log(float(max_timescale) / float(min_timescale)) /
(num_timescales - 1))
inv_timescales = min_timescale * torch.exp(
torch.arange(num_timescales, dtype=torch.float) * -log_timescale_increment)
scaled_time = position.unsqueeze(0) * inv_timescales.unsqueeze(1)
signal = torch.cat([torch.sin(scaled_time), torch.cos(scaled_time)], 0)
signal = F.pad(signal, [0, 0, 0, channels % 2])
signal = signal.view(1, channels, length)
return signal
def add_timing_signal_1d(x, min_timescale=1.0, max_timescale=1.0e4):
b, channels, length = x.size()
signal = get_timing_signal_1d(length, channels, min_timescale, max_timescale)
return x + signal.to(dtype=x.dtype, device=x.device)
def cat_timing_signal_1d(x, min_timescale=1.0, max_timescale=1.0e4, axis=1):
b, channels, length = x.size()
signal = get_timing_signal_1d(length, channels, min_timescale, max_timescale)
return torch.cat([x, signal.to(dtype=x.dtype, device=x.device)], axis)
def subsequent_mask(length):
mask = torch.tril(torch.ones(length, length)).unsqueeze(0).unsqueeze(0)
return mask
@torch.jit.script
def fused_add_tanh_sigmoid_multiply(input_a, input_b, n_channels):
n_channels_int = n_channels[0]
in_act = input_a + input_b
t_act = torch.tanh(in_act[:, :n_channels_int, :])
s_act = torch.sigmoid(in_act[:, n_channels_int:, :])
acts = t_act * s_act
return acts
def convert_pad_shape(pad_shape):
l = pad_shape[::-1]
pad_shape = [item for sublist in l for item in sublist]
return pad_shape
def shift_1d(x):
x = F.pad(x, convert_pad_shape([[0, 0], [0, 0], [1, 0]]))[:, :, :-1]
return x
def sequence_mask(length, max_length=None):
if max_length is None:
max_length = length.max()
x = torch.arange(max_length, dtype=length.dtype, device=length.device)
return x.unsqueeze(0) < length.unsqueeze(1)
def generate_path(duration, mask):
"""
duration: [b, 1, t_x]
mask: [b, 1, t_y, t_x]
"""
device = duration.device
b, _, t_y, t_x = mask.shape
cum_duration = torch.cumsum(duration, -1)
cum_duration_flat = cum_duration.view(b * t_x)
path = sequence_mask(cum_duration_flat, t_y).to(mask.dtype)
path = path.view(b, t_x, t_y)
path = path - F.pad(path, convert_pad_shape([[0, 0], [1, 0], [0, 0]]))[:, :-1]
path = path.unsqueeze(1).transpose(2,3) * mask
return path
def clip_grad_value_(parameters, clip_value, norm_type=2):
if isinstance(parameters, torch.Tensor):
parameters = [parameters]
parameters = list(filter(lambda p: p.grad is not None, parameters))
norm_type = float(norm_type)
if clip_value is not None:
clip_value = float(clip_value)
total_norm = 0
for p in parameters:
param_norm = p.grad.data.norm(norm_type)
total_norm += param_norm.item() ** norm_type
if clip_value is not None:
p.grad.data.clamp_(min=-clip_value, max=clip_value)
total_norm = total_norm ** (1. / norm_type)
return total_norm

88
configs/config.json Normal file
View File

@@ -0,0 +1,88 @@
{
"train": {
"log_interval": 200,
"eval_interval": 1000,
"seed": 1234,
"epochs": 10000,
"learning_rate": 0.0001,
"betas": [
0.8,
0.99
],
"eps": 1e-09,
"batch_size": 32,
"fp16_run": true,
"lr_decay": 0.999875,
"segment_size": 8192,
"init_lr_ratio": 1,
"warmup_epochs": 0,
"c_mel": 45,
"c_kl": 1.0
},
"data": {
"training_files": "filelists/train.list",
"validation_files": "filelists/val.list",
"max_wav_value": 32768.0,
"sampling_rate": 22050,
"filter_length": 1024,
"hop_length": 256,
"win_length": 1024,
"n_mel_channels": 80,
"mel_fmin": 0.0,
"mel_fmax": null,
"add_blank": true,
"n_speakers": 300,
"cleaned_text": true,
"spk2id": {
"0001_Angry": 0
}
},
"model": {
"inter_channels": 192,
"hidden_channels": 192,
"filter_channels": 768,
"n_heads": 2,
"n_layers": 6,
"kernel_size": 3,
"p_dropout": 0.1,
"resblock": "1",
"resblock_kernel_sizes": [
3,
7,
11
],
"resblock_dilation_sizes": [
[
1,
3,
5
],
[
1,
3,
5
],
[
1,
3,
5
]
],
"upsample_rates": [
8,
8,
2,
2
],
"upsample_initial_channel": 512,
"upsample_kernel_sizes": [
16,
16,
4,
4
],
"n_layers_q": 3,
"use_spectral_norm": false,
"gin_channels": 256
}
}

282
data_utils.py Normal file
View File

@@ -0,0 +1,282 @@
import time
import os
import random
import numpy as np
import torch
import torch.utils.data
import commons
from mel_processing import spectrogram_torch
from utils import load_wav_to_torch, load_filepaths_and_text
from text import cleaned_text_to_sequence, cleaned_text_to_sequence_bert, get_bert
"""Multi speaker version"""
class TextAudioSpeakerLoader(torch.utils.data.Dataset):
"""
1) loads audio, speaker_id, text pairs
2) normalizes text and converts them to sequences of integers
3) computes spectrograms from audio files.
"""
def __init__(self, audiopaths_sid_text, hparams):
self.audiopaths_sid_text = load_filepaths_and_text(audiopaths_sid_text)
self.max_wav_value = hparams.max_wav_value
self.sampling_rate = hparams.sampling_rate
self.filter_length = hparams.filter_length
self.hop_length = hparams.hop_length
self.win_length = hparams.win_length
self.sampling_rate = hparams.sampling_rate
self.spk_map = hparams.spk2id
self.cleaned_text = getattr(hparams, "cleaned_text", False)
self.add_blank = hparams.add_blank
self.min_text_len = getattr(hparams, "min_text_len", 1)
self.max_text_len = getattr(hparams, "max_text_len", 300)
random.seed(1234)
random.shuffle(self.audiopaths_sid_text)
self._filter()
def _filter(self):
"""
Filter text & store spec lengths
"""
# Store spectrogram lengths for Bucketing
# wav_length ~= file_size / (wav_channels * Bytes per dim) = file_size / (1 * 2)
# spec_length = wav_length // hop_length
audiopaths_sid_text_new = []
lengths = []
skipped = 0
for _id, spk, language, text, phones, tone, word2ph in self.audiopaths_sid_text:
audiopath = f'dataset/{spk}/{_id}.wav'
if self.min_text_len <= len(phones) and len(phones) <= self.max_text_len:
phones = phones.split(" ")
tone = [int(i) for i in tone.split(" ")]
word2ph = [int(i) for i in word2ph.split(" ")]
audiopaths_sid_text_new.append([audiopath, spk, language,text, phones, tone, word2ph])
lengths.append(os.path.getsize(audiopath) // (2 * self.hop_length))
else:
skipped += 1
print("skipped: ", skipped, ", total: ", len(self.audiopaths_sid_text))
self.audiopaths_sid_text = audiopaths_sid_text_new
self.lengths = lengths
def get_audio_text_speaker_pair(self, audiopath_sid_text):
# separate filename, speaker_id and text
audiopath, sid, language, text, phones, tone, word2ph = audiopath_sid_text
bert, phones, tone, language = self.get_text(text, word2ph, phones, tone, language)
spec, wav = self.get_audio(audiopath)
sid = torch.LongTensor([int(self.spk_map[sid])])
return (phones, spec, wav, sid, tone, language, bert)
def get_audio(self, filename):
audio, sampling_rate = load_wav_to_torch(filename)
if sampling_rate != self.sampling_rate:
raise ValueError("{} {} SR doesn't match target {} SR".format(
sampling_rate, self.sampling_rate))
audio_norm = audio / self.max_wav_value
audio_norm = audio_norm.unsqueeze(0)
spec_filename = filename.replace(".wav", ".spec.pt")
if os.path.exists(spec_filename):
spec = torch.load(spec_filename)
else:
spec = spectrogram_torch(audio_norm, self.filter_length,
self.sampling_rate, self.hop_length, self.win_length,
center=False)
spec = torch.squeeze(spec, 0)
torch.save(spec, spec_filename)
return spec, audio_norm
def get_text(self,text, word2ph,phone, tone, language_str):
phone, tone, language = cleaned_text_to_sequence(phone, tone, language_str)
if self.add_blank:
phone = commons.intersperse(phone, 0)
tone = commons.intersperse(tone, 0)
language = commons.intersperse(language, 0)
for i in range(1,len(word2ph)):
word2ph[i] += 1
bert = get_bert(text, word2ph, language_str)
phone = torch.LongTensor(phone)
tone = torch.LongTensor(tone)
language = torch.LongTensor(language)
return bert, phone, tone, language
def get_sid(self, sid):
sid = torch.LongTensor([int(sid)])
return sid
def __getitem__(self, index):
return self.get_audio_text_speaker_pair(self.audiopaths_sid_text[index])
def __len__(self):
return len(self.audiopaths_sid_text)
class TextAudioSpeakerCollate():
""" Zero-pads model inputs and targets
"""
def __init__(self, return_ids=False):
self.return_ids = return_ids
def __call__(self, batch):
"""Collate's training batch from normalized text, audio and speaker identities
PARAMS
------
batch: [text_normalized, spec_normalized, wav_normalized, sid]
"""
# Right zero-pad all one-hot text sequences to max input length
_, ids_sorted_decreasing = torch.sort(
torch.LongTensor([x[1].size(1) for x in batch]),
dim=0, descending=True)
max_text_len = max([len(x[0]) for x in batch])
max_spec_len = max([x[1].size(1) for x in batch])
max_wav_len = max([x[2].size(1) for x in batch])
text_lengths = torch.LongTensor(len(batch))
spec_lengths = torch.LongTensor(len(batch))
wav_lengths = torch.LongTensor(len(batch))
sid = torch.LongTensor(len(batch))
text_padded = torch.LongTensor(len(batch), max_text_len)
tone_padded = torch.LongTensor(len(batch), max_text_len)
language_padded = torch.LongTensor(len(batch), max_text_len)
bert_padded = torch.FloatTensor(len(batch), 1024, max_text_len)
spec_padded = torch.FloatTensor(len(batch), batch[0][1].size(0), max_spec_len)
wav_padded = torch.FloatTensor(len(batch), 1, max_wav_len)
text_padded.zero_()
tone_padded.zero_()
language_padded.zero_()
spec_padded.zero_()
wav_padded.zero_()
bert_padded.zero_()
for i in range(len(ids_sorted_decreasing)):
row = batch[ids_sorted_decreasing[i]]
text = row[0]
text_padded[i, :text.size(0)] = text
text_lengths[i] = text.size(0)
spec = row[1]
spec_padded[i, :, :spec.size(1)] = spec
spec_lengths[i] = spec.size(1)
wav = row[2]
wav_padded[i, :, :wav.size(1)] = wav
wav_lengths[i] = wav.size(1)
sid[i] = row[3]
tone = row[4]
tone_padded[i, :tone.size(0)] = tone
language = row[5]
language_padded[i, :language.size(0)] = language
bert = row[6]
bert_padded[i, :, :bert.size(1)] = bert
return text_padded, text_lengths, spec_padded, spec_lengths, wav_padded, wav_lengths, sid, tone_padded, language_padded, bert_padded
class DistributedBucketSampler(torch.utils.data.distributed.DistributedSampler):
"""
Maintain similar input lengths in a batch.
Length groups are specified by boundaries.
Ex) boundaries = [b1, b2, b3] -> any batch is included either {x | b1 < length(x) <=b2} or {x | b2 < length(x) <= b3}.
It removes samples which are not included in the boundaries.
Ex) boundaries = [b1, b2, b3] -> any x s.t. length(x) <= b1 or length(x) > b3 are discarded.
"""
def __init__(self, dataset, batch_size, boundaries, num_replicas=None, rank=None, shuffle=True):
super().__init__(dataset, num_replicas=num_replicas, rank=rank, shuffle=shuffle)
self.lengths = dataset.lengths
self.batch_size = batch_size
self.boundaries = boundaries
self.buckets, self.num_samples_per_bucket = self._create_buckets()
self.total_size = sum(self.num_samples_per_bucket)
self.num_samples = self.total_size // self.num_replicas
def _create_buckets(self):
buckets = [[] for _ in range(len(self.boundaries) - 1)]
for i in range(len(self.lengths)):
length = self.lengths[i]
idx_bucket = self._bisect(length)
if idx_bucket != -1:
buckets[idx_bucket].append(i)
for i in range(len(buckets) - 1, 0, -1):
if len(buckets[i]) == 0:
buckets.pop(i)
self.boundaries.pop(i+1)
num_samples_per_bucket = []
for i in range(len(buckets)):
len_bucket = len(buckets[i])
total_batch_size = self.num_replicas * self.batch_size
rem = (total_batch_size - (len_bucket % total_batch_size)) % total_batch_size
num_samples_per_bucket.append(len_bucket + rem)
return buckets, num_samples_per_bucket
def __iter__(self):
# deterministically shuffle based on epoch
g = torch.Generator()
g.manual_seed(self.epoch)
indices = []
if self.shuffle:
for bucket in self.buckets:
indices.append(torch.randperm(len(bucket), generator=g).tolist())
else:
for bucket in self.buckets:
indices.append(list(range(len(bucket))))
batches = []
for i in range(len(self.buckets)):
bucket = self.buckets[i]
len_bucket = len(bucket)
ids_bucket = indices[i]
num_samples_bucket = self.num_samples_per_bucket[i]
# add extra samples to make it evenly divisible
rem = num_samples_bucket - len_bucket
ids_bucket = ids_bucket + ids_bucket * (rem // len_bucket) + ids_bucket[:(rem % len_bucket)]
# subsample
ids_bucket = ids_bucket[self.rank::self.num_replicas]
# batching
for j in range(len(ids_bucket) // self.batch_size):
batch = [bucket[idx] for idx in ids_bucket[j*self.batch_size:(j+1)*self.batch_size]]
batches.append(batch)
if self.shuffle:
batch_ids = torch.randperm(len(batches), generator=g).tolist()
batches = [batches[i] for i in batch_ids]
self.batches = batches
assert len(self.batches) * self.batch_size == self.num_samples
return iter(self.batches)
def _bisect(self, x, lo=0, hi=None):
if hi is None:
hi = len(self.boundaries) - 1
if hi > lo:
mid = (hi + lo) // 2
if self.boundaries[mid] < x and x <= self.boundaries[mid+1]:
return mid
elif x <= self.boundaries[mid]:
return self._bisect(x, lo, mid)
else:
return self._bisect(x, mid + 1, hi)
else:
return -1
def __len__(self):
return self.num_samples // self.batch_size

243
filelists/esd.list Normal file
View File

@@ -0,0 +1,243 @@
0001_000352|0001_Angry|ZH|英国的哲学家曾经说过“
0001_000353|0001_Angry|ZH|我老家在北京,哇塞!太精彩了。
0001_000351|0001_Angry|ZH|打远一看,它们的确很是美丽,
0001_000354|0001_Angry|ZH|不管怎么说主队好象是志在夺魁。
0001_000368|0001_Angry|ZH|我们意见不和,咱们去那儿玩吧。
0001_000369|0001_Angry|ZH|不就是你嘛,为什么要偷笑来。
0001_000355|0001_Angry|ZH|我们乘船漂游了三峡,真是刺激。
0001_000357|0001_Angry|ZH|我每个月打一次电话。
0001_000356|0001_Angry|ZH|我喜欢“北京欢迎你”。
0001_000367|0001_Angry|ZH|很快你上大学就用得到了。
0001_000366|0001_Angry|ZH|他一定是一眼就被你迷住了。
0001_000358|0001_Angry|ZH|沙尘暴好像给每个人都带来了麻烦!
0001_000364|0001_Angry|ZH|谁你也不认识,我很乐意帮助你。
0001_000370|0001_Angry|ZH|前几天我碰见了一件有趣的事儿。
0001_000365|0001_Angry|ZH|我特别喜欢网球和登山。
0001_000359|0001_Angry|ZH|就是这个意思,你又聪明又好看。
0001_000361|0001_Angry|ZH|妇女节快乐。我永远爱你,妈妈。
0001_000360|0001_Angry|ZH|个人收藏家!他们肯定有,
0001_000362|0001_Angry|ZH|你每次谈恋爱都像现在这样。
0001_000363|0001_Angry|ZH|周末的我,只忙着陪你。
0001_000583|0001_Angry|ZH|拜托,别跟我提到笔记本电脑。
0001_000597|0001_Angry|ZH|没有为什么就是要等我。
0001_000568|0001_Angry|ZH|明天是星期天,我们去透透气吧。
0001_000540|0001_Angry|ZH|上海现在是下午四点三十六分。
0001_000554|0001_Angry|ZH|你昨天才买衣服,真是一购物狂。
0001_000408|0001_Angry|ZH|让人看上去就感到宽广,气魄非凡。
0001_000434|0001_Angry|ZH|他好像跟他的秘书有过一腿。
0001_000420|0001_Angry|ZH|心动不如行动,我不太擅长卖萌。
0001_000636|0001_Angry|ZH|门儿都没有,现在还不会。
0001_000622|0001_Angry|ZH|沈阳明天有雷阵雨,多云转晴。
0001_000623|0001_Angry|ZH|但梅花往往被很多人忽视。
0001_000637|0001_Angry|ZH|我太喜欢听了,所以不断重复着听。
0001_000421|0001_Angry|ZH|只要令人鼓舞的电影我都喜欢。
0001_000435|0001_Angry|ZH|是啊,他的健康我总放心不下。
0001_000409|0001_Angry|ZH|只要是我能玩好的,我都喜欢。
0001_000555|0001_Angry|ZH|还要叫她起床,怎么会不早起。
0001_000541|0001_Angry|ZH|别问了!说多了都是眼泪!
0001_000569|0001_Angry|ZH|大部分都是用诱饵钓到的。
0001_000596|0001_Angry|ZH|领带对男人来说真必不可少。
0001_000582|0001_Angry|ZH|我最近正在努力练习棋艺。
0001_000594|0001_Angry|ZH|我的直系亲属人数不多。
0001_000580|0001_Angry|ZH|那不打扰你了,我不敢约出去。
0001_000557|0001_Angry|ZH|我是萌萌哒,你是呆呆哒。
0001_000543|0001_Angry|ZH|带女友出去好好吃上一顿。
0001_000423|0001_Angry|ZH|她总是带香甜甜的微笑。
0001_000437|0001_Angry|ZH|是没什么但是挺别扭的。
0001_000609|0001_Angry|ZH|我们想等一个合适的时候。
0001_000621|0001_Angry|ZH|很大,令人兴奋但是嘈杂。
0001_000635|0001_Angry|ZH|自己保重,记得要常联系。
0001_000634|0001_Angry|ZH|有充足的时间购物和观光。
0001_000620|0001_Angry|ZH|没有找到你想删除的闹钟。
0001_000608|0001_Angry|ZH|这句话的意义我不太明白。
0001_000436|0001_Angry|ZH|真想不到,游泳竟有如此多的好处,
0001_000422|0001_Angry|ZH|资料全都不见了。气死我了。
0001_000542|0001_Angry|ZH|如果我滚远了就回不来了。
0001_000556|0001_Angry|ZH|是的,我知道,患难见真情。
0001_000581|0001_Angry|ZH|最近很冷,风又大。
0001_000595|0001_Angry|ZH|贾尼斯突然兴奋地大叫起来。
0001_000591|0001_Angry|ZH|请勿进入竹林。不让进。
0001_000585|0001_Angry|ZH|我爱运动,但是对篮球玩得不多。
0001_000552|0001_Angry|ZH|那就一会再说,我好害怕。
0001_000546|0001_Angry|ZH|我饿啦,我想去吃点东西。
0001_000426|0001_Angry|ZH|是的,你是个大块头,我是守门员。
0001_000432|0001_Angry|ZH|听说你要去香港看你叔叔。
0001_000624|0001_Angry|ZH|只要不违法,我还是想留下它。
0001_000630|0001_Angry|ZH|绝对不可以走到湖的中央。
0001_000618|0001_Angry|ZH|谁都有烦的时候。
0001_000619|0001_Angry|ZH|是很棒的一款手机,性价比超级高。
0001_000631|0001_Angry|ZH|晚安,么么哒,满天都是小星星。
0001_000625|0001_Angry|ZH|然后再找一个音乐播放器,
0001_000433|0001_Angry|ZH|你身上的每一点都吸引着我。
0001_000427|0001_Angry|ZH|奏婚礼进行曲了,他们过来了。
0001_000547|0001_Angry|ZH|为什么不,交朋友不分性别。
0001_000553|0001_Angry|ZH|希望我有一天也可以去那里。
0001_000584|0001_Angry|ZH|它是一个主要的空气污染物。
0001_000590|0001_Angry|ZH|大约一个小时左右。
0001_000586|0001_Angry|ZH|我不需要嗅觉,所以没有鼻子。
0001_000592|0001_Angry|ZH|为了不让鱼吃掉诗人的身体。
0001_000545|0001_Angry|ZH|我以为你们国家的人都是麻将高手。
0001_000551|0001_Angry|ZH|也就是一大堆照片。
0001_000579|0001_Angry|ZH|这个位置不错,下车。
0001_000431|0001_Angry|ZH|这个镇上所有的人都喜欢扯闲话。
0001_000425|0001_Angry|ZH|我也想去看可爱的熊猫。
0001_000419|0001_Angry|ZH|以后不要喝那么多了,伤身体。
0001_000633|0001_Angry|ZH|我想所有中国人都会打乒乓球。
0001_000627|0001_Angry|ZH|是的,所以我永不喝它的。
0001_000626|0001_Angry|ZH|我当然喜欢,我很注意颜面。
0001_000632|0001_Angry|ZH|有些人划船,有的人在进行花草活动
0001_000418|0001_Angry|ZH|我应该给女朋友买玫瑰花的。
0001_000424|0001_Angry|ZH|今年应该是第二十七个教师节。
0001_000430|0001_Angry|ZH|看呀,我们差不多就装饰好了。
0001_000578|0001_Angry|ZH|好的。新的音乐厅有一场音乐会。
0001_000550|0001_Angry|ZH|我已经习惯这种气候了。
0001_000544|0001_Angry|ZH|炖肉一小时,剩余三十分钟十八秒。
0001_000593|0001_Angry|ZH|那样的话你应该穿讲究一点。
0001_000587|0001_Angry|ZH|雪下得真大,带着我去购物。
0001_000523|0001_Angry|ZH|一套古瓷器。它真的很珍贵。
0001_000537|0001_Angry|ZH|我们一起为他办个惊喜派对。
0001_000494|0001_Angry|ZH|节食减肥很痛苦。
0001_000480|0001_Angry|ZH|我的希望是工作到倒下的那一天。
0001_000457|0001_Angry|ZH|我的表两点四十二。可是它有点快。
0001_000443|0001_Angry|ZH|别不好意思。再多吃些鸡肉。
0001_000696|0001_Angry|ZH|好好休息一下,这个小木棍叫梯。
0001_000682|0001_Angry|ZH|我想要那种新款的美国兵款式。
0001_000669|0001_Angry|ZH|家里有全自动洗衣机。
0001_000655|0001_Angry|ZH|我支持你。它是需要重做。
0001_000641|0001_Angry|ZH|在法国南部,气候常年舒适宜人。
0001_000640|0001_Angry|ZH|还有聊天记录。
0001_000654|0001_Angry|ZH|我刚从苏格兰回来。
0001_000668|0001_Angry|ZH|下午好,蒂娜,我想我问错人了。
0001_000683|0001_Angry|ZH|错过这村可就没这个店了。
0001_000697|0001_Angry|ZH|这两块是唐朝不同时期铸造的。
0001_000442|0001_Angry|ZH|不会这么凑巧吧!我也是十六。
0001_000456|0001_Angry|ZH|做不了什么,通常我会保持沉默。
0001_000481|0001_Angry|ZH|吝啬鬼!他每天还骑自行车上学!
0001_000495|0001_Angry|ZH|听大自然的声响,就像听音乐一样!
0001_000536|0001_Angry|ZH|软妹子生气会说:讨厌,不理你啦。
0001_000522|0001_Angry|ZH|我是个学生,服务器响应超时。
0001_000508|0001_Angry|ZH|我的性格就是冷静并且客观。
0001_000534|0001_Angry|ZH|二零一六年十一月五号是星期六。
0001_000520|0001_Angry|ZH|这样你就有时间挥拍打球了。
0001_000483|0001_Angry|ZH|是不是依然觉得我很可爱。
0001_000497|0001_Angry|ZH|不知道。或许一双新鞋。
0001_000468|0001_Angry|ZH|你的同学把你给捉弄了吧。
0001_000440|0001_Angry|ZH|还不太糟糕,但是得躺在床上。
0001_000454|0001_Angry|ZH|没有找到蒸鱼的计时。
0001_000681|0001_Angry|ZH|于是我就问她能不能连我的票买了。
0001_000695|0001_Angry|ZH|别总是闲着,找点事情干。
0001_000642|0001_Angry|ZH|哪天我也许得和他谈谈。
0001_000656|0001_Angry|ZH|我在一个机械化农场做工程师。
0001_000657|0001_Angry|ZH|有时内在美更加重要。
0001_000643|0001_Angry|ZH|振作点儿,我看了屏幕显示!
0001_000694|0001_Angry|ZH|很漂亮,不过人多拥挤。
0001_000680|0001_Angry|ZH|我们相处得很好,仅此而已。
0001_000455|0001_Angry|ZH|我们俩合不来,还经常吵架。
0001_000441|0001_Angry|ZH|如果有我能帮忙的请告诉我。
0001_000469|0001_Angry|ZH|不过我想星期五走,
0001_000496|0001_Angry|ZH|现在,我仍然有点紧张。
0001_000482|0001_Angry|ZH|是你最牵挂的那个女人。
0001_000521|0001_Angry|ZH|你这个小气鬼,很不幸,非常少。
0001_000535|0001_Angry|ZH|今天真凉快,我希望主队输掉。
0001_000509|0001_Angry|ZH|我不会牺牲我的健康来换取金钱的。
0001_000531|0001_Angry|ZH|时间对珍尼来说是没有用的。
0001_000525|0001_Angry|ZH|她此刻失业了,你最好不要惹她。
0001_000519|0001_Angry|ZH|让我再想想,真相已经上传了。
0001_000486|0001_Angry|ZH|我喜欢几乎所有的运动,
0001_000492|0001_Angry|ZH|是啊,我还是个乳臭未干的小记者。
0001_000445|0001_Angry|ZH|我倒是有一个爱好――收藏古董。
0001_000451|0001_Angry|ZH|很快,车就可自动开了。
0001_000479|0001_Angry|ZH|对别人没有,而对我就有。
0001_000684|0001_Angry|ZH|我曾经养过,我太高兴了。
0001_000690|0001_Angry|ZH|每天晚上跟你互道晚安真幸福。
0001_000647|0001_Angry|ZH|三个,两个儿子一个女儿。
0001_000653|0001_Angry|ZH|我一直到清晨四点才到家,
0001_000652|0001_Angry|ZH|我希望你能和我一起想派对点子。
0001_000646|0001_Angry|ZH|赌博往往是个祸根,
0001_000691|0001_Angry|ZH|我会在你的脸上画鬼脸。
0001_000685|0001_Angry|ZH|他们将于今年夏天结婚。
0001_000478|0001_Angry|ZH|这些颜色也不太适合你。
0001_000450|0001_Angry|ZH|就经常去我们宿舍附近的酒吧。
0001_000444|0001_Angry|ZH|很神奇的样子,我搞不懂为什么。
0001_000493|0001_Angry|ZH|女孩的心思你别猜,但是我不用猜。
0001_000487|0001_Angry|ZH|也许能帮助你把事情弄清楚。
0001_000518|0001_Angry|ZH|你得先回答我,你最喜欢谁。
0001_000524|0001_Angry|ZH|他在这次竞选活动中花了数百万,
0001_000530|0001_Angry|ZH|冬天雨非常多。我不喜欢雨天。
0001_000526|0001_Angry|ZH|带上你的家人,但是他有丑闻。
0001_000532|0001_Angry|ZH|大概足够支持我生活三个月的。
0001_000491|0001_Angry|ZH|你可以去问鹦鹉啊,鹦鹉会说话。
0001_000485|0001_Angry|ZH|我要学习一下相关知识。
0001_000452|0001_Angry|ZH|我昨天遇到马克,他看起来很忧郁。
0001_000446|0001_Angry|ZH|别小看我这发型!我还蛮喜欢的。
0001_000693|0001_Angry|ZH|许多白领都参加到这个游戏里面,
0001_000687|0001_Angry|ZH|你看起来很高兴,眼睛闪闪发亮。
0001_000650|0001_Angry|ZH|这个我相信,我是登山爱好者。
0001_000644|0001_Angry|ZH|我是银灰色的,我都被你说饿了。
0001_000678|0001_Angry|ZH|太棒了,我们下午可以在湖里划船。
0001_000679|0001_Angry|ZH|但是有时夏天比其它季节更迷人。
0001_000645|0001_Angry|ZH|文学和经济,我喜欢很多著作。
0001_000651|0001_Angry|ZH|播放歌单收藏,脑筋可动得真快。
0001_000686|0001_Angry|ZH|谢谢你的夸奖,鲍伯上年纪了。
0001_000692|0001_Angry|ZH|我缺钱用,所以上星期把它当了。
0001_000447|0001_Angry|ZH|你女儿和她妈妈长得很像。
0001_000453|0001_Angry|ZH|感觉好温暖呀,好的,一会儿见。
0001_000484|0001_Angry|ZH|多教我些东西我会更聪明。
0001_000490|0001_Angry|ZH|我也知道自己是大嘴巴。
0001_000533|0001_Angry|ZH|你绝对猜不到她准备要孩子了。
0001_000527|0001_Angry|ZH|你在我的心里折腾好久了。
0001_000700|0001_Angry|ZH|是很难听的脏话,主人可别学了。
0001_000502|0001_Angry|ZH|小心脚下。人行道上有个坑。
0001_000516|0001_Angry|ZH|我想那些应该是草莓的种子。
0001_000489|0001_Angry|ZH|他们的配合值得我们学习
0001_000476|0001_Angry|ZH|不是,他住在沃斯盾的老房子里。
0001_000462|0001_Angry|ZH|那棒极了,其实心情挺不错。
0001_000648|0001_Angry|ZH|祝你春节快乐,全家幸福安康。
0001_000674|0001_Angry|ZH|我喜欢吃中餐。
0001_000660|0001_Angry|ZH|这局我让你开,今天我不想错过。
0001_000661|0001_Angry|ZH|我们休息一下喝杯咖啡。
0001_000675|0001_Angry|ZH|尽管提意见,我会改正的。
0001_000649|0001_Angry|ZH|是的,我刚撞到了桌子。
0001_000463|0001_Angry|ZH|玛丽,你看来很喜欢挖苦我。
0001_000477|0001_Angry|ZH|你说我们在芝加哥要待三天的。
0001_000488|0001_Angry|ZH|我总是控制不了它。
0001_000517|0001_Angry|ZH|太妙了,我想换一些日元。
0001_000503|0001_Angry|ZH|我们还等什么
0001_000529|0001_Angry|ZH|她和维克分手了,所以她申请转调。
0001_000515|0001_Angry|ZH|其实我们前天已经分手了。
0001_000501|0001_Angry|ZH|我也最喜欢你,不要开枪。我投降
0001_000449|0001_Angry|ZH|得了吧,别这么胆小啦。
0001_000461|0001_Angry|ZH|每天早晨都是我妈妈帮他系的。
0001_000475|0001_Angry|ZH|如果你想要纹身,你去纹好了。
0001_000688|0001_Angry|ZH|年轻人当然要承担责任,
0001_000663|0001_Angry|ZH|旅行结束后我将休息一段时间。
0001_000677|0001_Angry|ZH|我讨厌吃醋,偶是不懂,你懂。
0001_000676|0001_Angry|ZH|这么多笑话,一天讲不完!
0001_000662|0001_Angry|ZH|如果她拒绝我,我会死的。
0001_000689|0001_Angry|ZH|不要乱问女孩子的年龄。
0001_000474|0001_Angry|ZH|是的,请返还我的钱,谢谢。
0001_000460|0001_Angry|ZH|自己的事情要自己做。
0001_000448|0001_Angry|ZH|我只会斗斗地主什么的。
0001_000500|0001_Angry|ZH|这样子比较有趣。
0001_000514|0001_Angry|ZH|我曾在一家船运公司里面做过六年。
0001_000528|0001_Angry|ZH|你转一个,我想学习下。
0001_000510|0001_Angry|ZH|当然!他是我们大学的班长。
0001_000504|0001_Angry|ZH|我还不会说其他外语,只会普通话。
0001_000538|0001_Angry|ZH|以后我要经常来这儿爬山。
0001_000464|0001_Angry|ZH|我也是,我还有点儿口渴。
0001_000470|0001_Angry|ZH|你还真是考虑周到。
0001_000458|0001_Angry|ZH|让我们看看哪一种球技比较好。
0001_000699|0001_Angry|ZH|是的,真是名副其实。
0001_000666|0001_Angry|ZH|每次你看到一些时尚衣物时,
0001_000672|0001_Angry|ZH|等待你的指令,随时可为你效劳。
0001_000673|0001_Angry|ZH|他对谁都那么友好。
0001_000667|0001_Angry|ZH|你看上去比以前更漂亮了。
0001_000698|0001_Angry|ZH|我喜欢你的黑衣服,你的尖牙真酷。
0001_000459|0001_Angry|ZH|太棒了,我其实挺饿的。
0001_000471|0001_Angry|ZH|那你就离市区很远了。
0001_000465|0001_Angry|ZH|真是个好习惯,通常看书或消遣。
0001_000539|0001_Angry|ZH|我是一名教师,你可是好眼光。
0001_000505|0001_Angry|ZH|我只打算放松一下自己。
0001_000511|0001_Angry|ZH|他讲的笑话让我笑个不停。
0001_000507|0001_Angry|ZH|你知道,有时候病人会不讲理。
0001_000513|0001_Angry|ZH|我还不知道你认识弗兰克。

243
filelists/esd.list.cleaned Normal file
View File

@@ -0,0 +1,243 @@
0001_000352|0001_Angry|ZH|英国的哲学家曾经说过'|_ y ing g uo d e zh e x ve j ia c eng j ing sh uo g uo ' _|0 1 1 2 2 5 5 2 2 2 2 1 1 2 2 1 1 1 1 5 5 0 0|1 2 2 2 2 2 2 2 2 2 2 1 1
0001_000353|0001_Angry|ZH|我老家在北京,哇塞!太精彩了.|_ w o l ao j ia z ai b ei j ing , w a s ai ! t ai j ing c ai l e . _|0 2 2 3 3 1 1 4 4 3 3 1 1 0 1 1 1 1 0 4 4 1 1 3 3 5 5 0 0|1 2 2 2 2 2 2 1 2 2 1 2 2 2 2 1 1
0001_000351|0001_Angry|ZH|打远一看,它们的确很是美丽,|_ d a y van y i k an , t a m en d i q ve h en sh ir m ei l i , _|0 2 2 3 3 2 2 4 4 0 1 1 5 5 2 2 4 4 3 3 4 4 3 3 4 4 0 0|1 2 2 2 2 1 2 2 2 2 2 2 2 2 1 1
0001_000354|0001_Angry|ZH|不管怎么说主队好象是志在夺魁.|_ b u g uan z en m e sh uo zh u d ui h ao x iang sh ir zh ir z ai d uo k ui . _|0 4 4 3 3 3 3 5 5 1 1 3 3 4 4 3 3 4 4 4 4 4 4 4 4 2 2 2 2 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000368|0001_Angry|ZH|我们意见不和,咱们去那儿玩吧.|_ w o m en y i j ian b u h e , z an m en q v n a EE er w an b a . _|0 3 3 5 5 4 4 4 4 4 4 2 2 0 2 2 5 5 4 4 4 4 2 2 2 2 5 5 0 0|1 2 2 2 2 2 2 1 2 2 2 2 2 2 2 1 1
0001_000369|0001_Angry|ZH|不就是你嘛,为什么要偷笑来.|_ b u j iu sh ir n i m a , w ei sh en m e y ao t ou x iao l ai . _|0 2 2 4 4 4 4 3 3 5 5 0 4 4 2 2 5 5 4 4 1 1 4 4 2 2 0 0|1 2 2 2 2 2 1 2 2 2 2 2 2 2 1 1
0001_000355|0001_Angry|ZH|我们乘船漂游了三峡,真是刺激.|_ w o m en ch eng ch uan p iao y ou l e s an x ia , zh en sh ir c i0 j i . _|0 3 3 5 5 2 2 2 2 1 1 2 2 5 5 1 1 2 2 0 1 1 4 4 4 4 5 5 0 0|1 2 2 2 2 2 2 2 2 2 1 2 2 2 2 1 1
0001_000357|0001_Angry|ZH|我每个月打一次电话.|_ w o m ei g e y ve d a y i c i0 d ian h ua . _|0 2 2 3 3 5 5 4 4 3 3 2 2 4 4 4 4 4 4 0 0|1 2 2 2 2 2 2 2 2 2 1 1
0001_000356|0001_Angry|ZH|我喜欢'北京欢迎你'.|_ w o x i h uan ' b ei j ing h uan y ing n i ' . _|0 2 2 3 3 5 5 0 3 3 1 1 1 1 2 2 3 3 0 0 0|1 2 2 2 1 2 2 2 2 2 1 1 1
0001_000367|0001_Angry|ZH|很快你上大学就用得到了.|_ h en k uai n i sh ang d a x ve j iu y ong d e d ao l e . _|0 3 3 4 4 3 3 4 4 4 4 2 2 4 4 4 4 2 2 4 4 5 5 0 0|1 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000366|0001_Angry|ZH|他一定是一眼就被你迷住了.|_ t a y i d ing sh ir y i y En j iu b ei n i m i zh u l e . _|0 1 1 2 2 4 4 4 4 4 4 3 3 4 4 4 4 3 3 2 2 4 4 5 5 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000358|0001_Angry|ZH|沙尘暴好像给每个人都带来了麻烦!|_ sh a ch en b ao h ao x iang g ei m ei g e r en d ou d ai l ai l e m a f an ! _|0 1 1 2 2 4 4 3 3 4 4 2 2 3 3 5 5 2 2 1 1 4 4 2 2 5 5 2 2 5 5 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000364|0001_Angry|ZH|谁你也不认识,我很乐意帮助你.|_ sh ui n i y E b u r en sh ir , w o h en l e y i b ang zh u n i . _|0 2 2 2 2 3 3 2 2 4 4 5 5 0 2 2 3 3 4 4 4 4 1 1 4 4 3 3 0 0|1 2 2 2 2 2 2 1 2 2 2 2 2 2 2 1 1
0001_000370|0001_Angry|ZH|前几天我碰见了一件有趣的事儿.|_ q ian j i t ian w o p eng j ian l e y i j ian y ou q v d e sh ir EE er . _|0 2 2 3 3 1 1 3 3 4 4 4 4 5 5 2 2 4 4 3 3 4 4 5 5 4 4 2 2 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000365|0001_Angry|ZH|我特别喜欢网球和登山.|_ w o t e b ie x i h uan w ang q iu h e d eng sh an . _|0 3 3 4 4 2 2 3 3 5 5 3 3 2 2 2 2 1 1 1 1 0 0|1 2 2 2 2 2 2 2 2 2 2 1 1
0001_000359|0001_Angry|ZH|就是这个意思,你又聪明又好看.|_ j iu sh ir zh e g e y i s i0 , n i y ou c ong m ing y ou h ao k an . _|0 4 4 4 4 4 4 5 5 4 4 5 5 0 3 3 4 4 1 1 5 5 4 4 3 3 4 4 0 0|1 2 2 2 2 2 2 1 2 2 2 2 2 2 2 1 1
0001_000361|0001_Angry|ZH|妇女节快乐.我永远爱你,妈妈.|_ f u n v j ie k uai l e . w o y ong y van AA ai n i , m a m a . _|0 4 4 3 3 2 2 4 4 4 4 0 3 3 2 2 3 3 4 4 3 3 0 1 1 5 5 0 0|1 2 2 2 2 2 1 2 2 2 2 2 1 2 2 1 1
0001_000360|0001_Angry|ZH|个人收藏家!他们肯定有,|_ g e r en sh ou c ang j ia ! t a m en k en d ing y ou , _|0 4 4 2 2 1 1 2 2 1 1 0 1 1 5 5 3 3 4 4 3 3 0 0|1 2 2 2 2 2 1 2 2 2 2 2 1 1
0001_000362|0001_Angry|ZH|你每次谈恋爱都像现在这样.|_ n i m ei c i0 t an l ian AA ai d ou x iang x ian z ai zh e y ang . _|0 2 2 3 3 4 4 2 2 4 4 4 4 1 1 4 4 4 4 4 4 4 4 4 4 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000363|0001_Angry|ZH|周末的我,只忙着陪你.|_ zh ou m o d e w o , zh ir m ang zh e p ei n i . _|0 1 1 4 4 5 5 3 3 0 3 3 2 2 5 5 2 2 3 3 0 0|1 2 2 2 2 1 2 2 2 2 2 1 1
0001_000583|0001_Angry|ZH|拜托,别跟我提到笔记本电脑.|_ b ai t uo , b ie g en w o t i d ao b i j i b en d ian n ao . _|0 4 4 1 1 0 2 2 1 1 3 3 2 2 4 4 3 3 4 4 3 3 4 4 3 3 0 0|1 2 2 1 2 2 2 2 2 2 2 2 2 2 1 1
0001_000597|0001_Angry|ZH|没有为什么就是要等我.|_ m ei y ou w ei sh en m e j iu sh ir y ao d eng w o . _|0 2 2 3 3 4 4 2 2 5 5 4 4 4 4 4 4 2 2 3 3 0 0|1 2 2 2 2 2 2 2 2 2 2 1 1
0001_000568|0001_Angry|ZH|明天是星期天,我们去透透气吧.|_ m ing t ian sh ir x ing q i t ian , w o m en q v t ou t ou q i b a . _|0 2 2 1 1 4 4 1 1 1 1 1 1 0 3 3 5 5 4 4 4 4 5 5 4 4 5 5 0 0|1 2 2 2 2 2 2 1 2 2 2 2 2 2 2 1 1
0001_000540|0001_Angry|ZH|上海现在是下午四点三十六分.|_ sh ang h ai x ian z ai sh ir x ia w u s i0 d ian s an sh ir l iu f en . _|0 4 4 3 3 4 4 4 4 4 4 4 4 3 3 4 4 3 3 1 1 2 2 4 4 1 1 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000554|0001_Angry|ZH|你昨天才买衣服,真是一购物狂.|_ n i z uo t ian c ai m ai y i f u , zh en sh ir y i g ou w u k uang . _|0 3 3 2 2 1 1 2 2 3 3 1 1 5 5 0 1 1 4 4 2 2 4 4 4 4 2 2 0 0|1 2 2 2 2 2 2 2 1 2 2 2 2 2 2 1 1
0001_000408|0001_Angry|ZH|让人看上去就感到宽广,气魄非凡.|_ r ang r en k an sh ang q v j iu g an d ao k uan g uang , q i p o f ei f an . _|0 4 4 2 2 4 4 4 4 5 5 4 4 3 3 4 4 1 1 3 3 0 4 4 4 4 1 1 2 2 0 0|1 2 2 2 2 2 2 2 2 2 2 1 2 2 2 2 1 1
0001_000434|0001_Angry|ZH|他好像跟他的秘书有过一腿.|_ t a h ao x iang g en t a d e m i sh u y ou g uo y i t ui . _|0 1 1 3 3 4 4 1 1 1 1 5 5 4 4 1 1 3 3 5 5 4 4 3 3 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000420|0001_Angry|ZH|心动不如行动,我不太擅长卖萌.|_ x in d ong b u r u x ing d ong , w o b u t ai sh an ch ang m ai m eng . _|0 1 1 4 4 4 4 2 2 2 2 4 4 0 3 3 2 2 4 4 4 4 2 2 4 4 2 2 0 0|1 2 2 2 2 2 2 1 2 2 2 2 2 2 2 1 1
0001_000636|0001_Angry|ZH|门儿都没有,现在还不会.|_ m en EE er d ou m ei y ou , x ian z ai h ai b u h ui . _|0 2 2 2 2 1 1 2 2 3 3 0 4 4 4 4 2 2 2 2 4 4 0 0|1 2 2 2 2 2 1 2 2 2 2 2 1 1
0001_000622|0001_Angry|ZH|沈阳明天有雷阵雨,多云转晴.|_ sh en y ang m ing t ian y ou l ei zh en y v , d uo y vn zh uan q ing . _|0 3 3 2 2 2 2 1 1 3 3 2 2 4 4 3 3 0 1 1 2 2 3 3 2 2 0 0|1 2 2 2 2 2 2 2 2 1 2 2 2 2 1 1
0001_000623|0001_Angry|ZH|但梅花往往被很多人忽视.|_ d an m ei h ua w ang w ang b ei h en d uo r en h u sh ir . _|0 4 4 2 2 1 1 2 2 3 3 4 4 3 3 1 1 2 2 1 1 4 4 0 0|1 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000637|0001_Angry|ZH|我太喜欢听了,所以不断重复着听.|_ w o t ai x i h uan t ing l e , s uo y i b u d uan ch ong f u zh e t ing . _|0 3 3 4 4 3 3 5 5 1 1 5 5 0 2 2 3 3 2 2 4 4 2 2 4 4 5 5 1 1 0 0|1 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 1 1
0001_000421|0001_Angry|ZH|只要令人鼓舞的电影我都喜欢.|_ zh ir y ao l ing r en g u w u d e d ian y ing w o d ou x i h uan . _|0 3 3 4 4 4 4 2 2 2 2 3 3 5 5 4 4 3 3 3 3 1 1 3 3 5 5 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000435|0001_Angry|ZH|是啊,他的健康我总放心不下.|_ sh ir AA a , t a d e j ian k ang w o z ong f ang x in b u x ia . _|0 4 4 5 5 0 1 1 5 5 4 4 1 1 2 2 3 3 4 4 1 1 2 2 5 5 0 0|1 2 2 1 2 2 2 2 2 2 2 2 2 2 1 1
0001_000409|0001_Angry|ZH|只要是我能玩好的,我都喜欢.|_ zh ir y ao sh ir w o n eng w an h ao d e , w o d ou x i h uan . _|0 3 3 4 4 4 4 3 3 2 2 2 2 3 3 5 5 0 3 3 1 1 3 3 5 5 0 0|1 2 2 2 2 2 2 2 2 1 2 2 2 2 1 1
0001_000555|0001_Angry|ZH|还要叫她起床,怎么会不早起.|_ h ai y ao j iao t a q i ch uang , z en m e h ui b u z ao q i . _|0 2 2 4 4 4 4 1 1 3 3 2 2 0 3 3 5 5 4 4 4 4 2 2 3 3 0 0|1 2 2 2 2 2 2 1 2 2 2 2 2 2 1 1
0001_000541|0001_Angry|ZH|别问了!说多了都是眼泪!|_ b ie w en l e ! sh uo d uo l e d ou sh ir y En l ei ! _|0 2 2 4 4 5 5 0 1 1 1 1 5 5 1 1 4 4 3 3 4 4 0 0|1 2 2 2 1 2 2 2 2 2 2 2 1 1
0001_000569|0001_Angry|ZH|大部分都是用诱饵钓到的.|_ d a b u f en d ou sh ir y ong y ou EE er d iao d ao d e . _|0 4 4 4 4 5 5 1 1 4 4 4 4 4 4 3 3 4 4 4 4 5 5 0 0|1 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000596|0001_Angry|ZH|领带对男人来说真必不可少.|_ l ing d ai d ui n an r en l ai sh uo zh en b i b u k e sh ao . _|0 3 3 4 4 4 4 2 2 2 2 2 2 1 1 1 1 4 4 4 4 2 2 3 3 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000582|0001_Angry|ZH|我最近正在努力练习棋艺.|_ w o z ui j in zh eng z ai n u l i l ian x i q i y i . _|0 3 3 4 4 4 4 4 4 4 4 3 3 4 4 4 4 2 2 2 2 4 4 0 0|1 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000594|0001_Angry|ZH|我的直系亲属人数不多.|_ w o d e zh ir x i q in sh u r en sh u b u d uo . _|0 3 3 5 5 2 2 4 4 1 1 3 3 2 2 4 4 4 4 1 1 0 0|1 2 2 2 2 2 2 2 2 2 2 1 1
0001_000580|0001_Angry|ZH|那不打扰你了,我不敢约出去.|_ n a b u d a r ao n i l e , w o b u g an y ve ch u q v . _|0 4 4 4 4 2 2 3 3 3 3 5 5 0 3 3 4 4 3 3 1 1 1 1 5 5 0 0|1 2 2 2 2 2 2 1 2 2 2 2 2 2 1 1
0001_000557|0001_Angry|ZH|我是萌萌哒,你是呆呆哒.|_ w o sh ir m eng m eng d a , n i sh ir d ai d ai d a . _|0 3 3 4 4 2 2 2 2 5 5 0 3 3 4 4 1 1 1 1 5 5 0 0|1 2 2 2 2 2 1 2 2 2 2 2 1 1
0001_000543|0001_Angry|ZH|带女友出去好好吃上一顿.|_ d ai n v y ou ch u q v h ao h ao ch ir sh ang y i d un . _|0 4 4 2 2 3 3 1 1 5 5 3 3 5 5 1 1 4 4 2 2 4 4 0 0|1 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000423|0001_Angry|ZH|她总是带香甜甜的微笑.|_ t a z ong sh ir d ai x iang t ian t ian d e w ei x iao . _|0 1 1 3 3 4 4 4 4 1 1 2 2 2 2 5 5 1 1 4 4 0 0|1 2 2 2 2 2 2 2 2 2 2 1 1
0001_000437|0001_Angry|ZH|是没什么但是挺别扭的.|_ sh ir m ei sh en m e d an sh ir t ing b ie n iu d e . _|0 4 4 2 2 2 2 5 5 4 4 4 4 3 3 4 4 5 5 5 5 0 0|1 2 2 2 2 2 2 2 2 2 2 1 1
0001_000609|0001_Angry|ZH|我们想等一个合适的时候.|_ w o m en x iang d eng y i g e h e sh ir d e sh ir h ou . _|0 3 3 5 5 2 2 3 3 2 2 5 5 2 2 4 4 5 5 2 2 5 5 0 0|1 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000621|0001_Angry|ZH|很大,令人兴奋但是嘈杂.|_ h en d a , l ing r en x ing f en d an sh ir c ao z a . _|0 3 3 4 4 0 4 4 2 2 1 1 4 4 4 4 4 4 2 2 2 2 0 0|1 2 2 1 2 2 2 2 2 2 2 2 1 1
0001_000635|0001_Angry|ZH|自己保重,记得要常联系.|_ z i0 j i b ao zh ong , j i d e y ao ch ang l ian x i . _|0 4 4 3 3 3 3 4 4 0 4 4 5 5 4 4 2 2 2 2 4 4 0 0|1 2 2 2 2 1 2 2 2 2 2 2 1 1
0001_000634|0001_Angry|ZH|有充足的时间购物和观光.|_ y ou ch ong z u d e sh ir j ian g ou w u h e g uan g uang . _|0 3 3 1 1 2 2 5 5 2 2 1 1 4 4 4 4 2 2 1 1 1 1 0 0|1 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000620|0001_Angry|ZH|没有找到你想删除的闹钟.|_ m ei y ou zh ao d ao n i x iang sh an ch u d e n ao zh ong . _|0 2 2 3 3 3 3 4 4 2 2 3 3 1 1 2 2 5 5 4 4 1 1 0 0|1 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000608|0001_Angry|ZH|这句话的意义我不太明白.|_ zh e j v h ua d e y i y i w o b u t ai m ing b ai . _|0 4 4 4 4 4 4 5 5 4 4 4 4 3 3 2 2 4 4 2 2 5 5 0 0|1 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000436|0001_Angry|ZH|真想不到,游泳竟有如此多的好处,|_ zh en x iang b u d ao , y ou y ong j ing y ou r u c i0 d uo d e h ao ch u , _|0 1 1 3 3 5 5 4 4 0 2 2 3 3 4 4 3 3 2 2 3 3 1 1 5 5 3 3 4 4 0 0|1 2 2 2 2 1 2 2 2 2 2 2 2 2 2 2 1 1
0001_000422|0001_Angry|ZH|资料全都不见了.气死我了.|_ z i0 l iao q van d ou b u j ian l e . q i s i0 w o l e . _|0 1 1 4 4 2 2 1 1 2 2 4 4 5 5 0 4 4 3 3 3 3 5 5 0 0|1 2 2 2 2 2 2 2 1 2 2 2 2 1 1
0001_000542|0001_Angry|ZH|如果我滚远了就回不来了.|_ r u g uo w o g un y van l e j iu h ui b u l ai l e . _|0 2 2 3 3 3 3 2 2 3 3 5 5 4 4 2 2 5 5 2 2 5 5 0 0|1 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000556|0001_Angry|ZH|是的,我知道,患难见真情.|_ sh ir d e , w o zh ir d ao , h uan n an j ian zh en q ing . _|0 4 4 5 5 0 3 3 1 1 4 4 0 4 4 4 4 4 4 1 1 2 2 0 0|1 2 2 1 2 2 2 1 2 2 2 2 2 1 1
0001_000581|0001_Angry|ZH|最近很冷,风又大.|_ z ui j in h en l eng , f eng y ou d a . _|0 4 4 4 4 2 2 3 3 0 1 1 4 4 4 4 0 0|1 2 2 2 2 1 2 2 2 1 1
0001_000595|0001_Angry|ZH|贾尼斯突然兴奋地大叫起来.|_ j ia n i s i0 t u r an x ing f en d i d a j iao q i l ai . _|0 3 3 2 2 1 1 1 1 2 2 1 1 4 4 5 5 4 4 4 4 3 3 5 5 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000591|0001_Angry|ZH|请勿进入竹林.不让进.|_ q ing w u j in r u zh u l in . b u r ang j in . _|0 3 3 4 4 4 4 4 4 2 2 2 2 0 2 2 4 4 4 4 0 0|1 2 2 2 2 2 2 1 2 2 2 1 1
0001_000585|0001_Angry|ZH|我爱运动,但是对篮球玩得不多.|_ w o AA ai y vn d ong , d an sh ir d ui l an q iu w an d e b u d uo . _|0 3 3 4 4 4 4 4 4 0 4 4 4 4 4 4 2 2 2 2 2 2 5 5 4 4 1 1 0 0|1 2 2 2 2 1 2 2 2 2 2 2 2 2 2 1 1
0001_000552|0001_Angry|ZH|那就一会再说,我好害怕.|_ n a j iu y i h ui z ai sh uo , w o h ao h ai p a . _|0 4 4 4 4 2 2 4 4 4 4 1 1 0 2 2 3 3 4 4 4 4 0 0|1 2 2 2 2 2 2 1 2 2 2 2 1 1
0001_000546|0001_Angry|ZH|我饿啦,我想去吃点东西.|_ w o EE e l a , w o x iang q v ch ir d ian d ong x i . _|0 3 3 4 4 5 5 0 2 2 3 3 4 4 1 1 3 3 1 1 5 5 0 0|1 2 2 2 1 2 2 2 2 2 2 2 1 1
0001_000426|0001_Angry|ZH|是的,你是个大块头,我是守门员.|_ sh ir d e , n i sh ir g e d a k uai t ou , w o sh ir sh ou m en y van . _|0 4 4 5 5 0 3 3 4 4 5 5 4 4 4 4 2 2 0 3 3 4 4 3 3 2 2 2 2 0 0|1 2 2 1 2 2 2 2 2 2 1 2 2 2 2 2 1 1
0001_000432|0001_Angry|ZH|听说你要去香港看你叔叔.|_ t ing sh uo n i y ao q v x iang g ang k an n i sh u sh u . _|0 1 1 1 1 3 3 4 4 4 4 1 1 3 3 4 4 3 3 1 1 5 5 0 0|1 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000624|0001_Angry|ZH|只要不违法,我还是想留下它.|_ zh ir y ao b u w ei f a , w o h ai sh ir x iang l iu x ia t a . _|0 3 3 4 4 4 4 2 2 3 3 0 3 3 2 2 4 4 3 3 2 2 4 4 1 1 0 0|1 2 2 2 2 2 1 2 2 2 2 2 2 2 1 1
0001_000630|0001_Angry|ZH|绝对不可以走到湖的中央.|_ j ve d ui b u k e y i z ou d ao h u d e zh ong y ang . _|0 2 2 4 4 4 4 2 2 3 3 3 3 4 4 2 2 5 5 1 1 1 1 0 0|1 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000618|0001_Angry|ZH|谁都有烦的时候.|_ sh ui d ou y ou f an d e sh ir h ou . _|0 2 2 1 1 3 3 2 2 5 5 2 2 5 5 0 0|1 2 2 2 2 2 2 2 1 1
0001_000619|0001_Angry|ZH|是很棒的一款手机,性价比超级高.|_ sh ir h en b ang d e y i k uan sh ou j i , x ing j ia b i ch ao j i g ao . _|0 4 4 3 3 4 4 5 5 4 4 3 3 3 3 1 1 0 4 4 4 4 3 3 1 1 2 2 1 1 0 0|1 2 2 2 2 2 2 2 2 1 2 2 2 2 2 2 1 1
0001_000631|0001_Angry|ZH|晚安,么么哒,满天都是小星星.|_ w an AA an , m e m e d a , m an t ian d ou sh ir x iao x ing x ing . _|0 3 3 1 1 0 5 5 5 5 5 5 0 3 3 1 1 1 1 4 4 3 3 1 1 5 5 0 0|1 2 2 1 2 2 2 1 2 2 2 2 2 2 2 1 1
0001_000625|0001_Angry|ZH|然后再找一个音乐播放器,|_ r an h ou z ai zh ao y i g e y in y ve b o f ang q i , _|0 2 2 4 4 4 4 3 3 2 2 5 5 1 1 4 4 1 1 4 4 4 4 0 0|1 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000433|0001_Angry|ZH|你身上的每一点都吸引着我.|_ n i sh en sh ang d e m ei y i d ian d ou x i y in zh e w o . _|0 3 3 1 1 5 5 5 5 3 3 4 4 3 3 1 1 1 1 3 3 5 5 3 3 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000427|0001_Angry|ZH|奏婚礼进行曲了,他们过来了.|_ z ou h un l i j in x ing q v l e , t a m en g uo l ai l e . _|0 4 4 1 1 3 3 4 4 2 2 1 1 5 5 0 1 1 5 5 4 4 5 5 5 5 0 0|1 2 2 2 2 2 2 2 1 2 2 2 2 2 1 1
0001_000547|0001_Angry|ZH|为什么不,交朋友不分性别.|_ w ei sh en m e b u , j iao p eng y ou b u f en x ing b ie . _|0 4 4 2 2 5 5 4 4 0 1 1 2 2 5 5 4 4 1 1 4 4 2 2 0 0|1 2 2 2 2 1 2 2 2 2 2 2 2 1 1
0001_000553|0001_Angry|ZH|希望我有一天也可以去那里.|_ x i w ang w o y ou y i t ian y E k e y i q v n a l i . _|0 1 1 4 4 2 2 3 3 4 4 1 1 3 3 2 2 3 3 4 4 4 4 3 3 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000584|0001_Angry|ZH|它是一个主要的空气污染物.|_ t a sh ir y i g e zh u y ao d e k ong q i w u r an w u . _|0 1 1 4 4 2 2 5 5 3 3 4 4 5 5 1 1 4 4 1 1 3 3 4 4 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000590|0001_Angry|ZH|大约一个小时左右.|_ d a y ve y i g e x iao sh ir z uo y ou . _|0 4 4 1 1 2 2 5 5 3 3 2 2 3 3 4 4 0 0|1 2 2 2 2 2 2 2 2 1 1
0001_000586|0001_Angry|ZH|我不需要嗅觉,所以没有鼻子.|_ w o b u x v y ao x iu j ve , s uo y i m ei y ou b i z i0 . _|0 3 3 4 4 1 1 4 4 4 4 2 2 0 2 2 3 3 2 2 3 3 2 2 5 5 0 0|1 2 2 2 2 2 2 1 2 2 2 2 2 2 1 1
0001_000592|0001_Angry|ZH|为了不让鱼吃掉诗人的身体.|_ w ei l e b u r ang y v ch ir d iao sh ir r en d e sh en t i . _|0 4 4 5 5 2 2 4 4 2 2 1 1 4 4 1 1 2 2 5 5 1 1 3 3 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000545|0001_Angry|ZH|我以为你们国家的人都是麻将高手.|_ w o y i w ei n i m en g uo j ia d e r en d ou sh ir m a j iang g ao sh ou . _|0 2 2 3 3 2 2 3 3 5 5 2 2 1 1 5 5 2 2 1 1 4 4 2 2 1 1 1 1 3 3 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000551|0001_Angry|ZH|也就是一大堆照片.|_ y E j iu sh ir y i d a d ui zh ao p ian . _|0 3 3 4 4 4 4 2 2 4 4 1 1 4 4 1 1 0 0|1 2 2 2 2 2 2 2 2 1 1
0001_000579|0001_Angry|ZH|这个位置不错,下车.|_ zh e g e w ei zh ir b u c uo , x ia ch e . _|0 4 4 5 5 4 4 5 5 2 2 4 4 0 4 4 1 1 0 0|1 2 2 2 2 2 2 1 2 2 1 1
0001_000431|0001_Angry|ZH|这个镇上所有的人都喜欢扯闲话.|_ zh e g e zh en sh ang s uo y ou d e r en d ou x i h uan ch e x ian h ua . _|0 4 4 5 5 4 4 4 4 2 2 3 3 5 5 2 2 1 1 3 3 5 5 3 3 2 2 4 4 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000425|0001_Angry|ZH|我也想去看可爱的熊猫.|_ w o y E x iang q v k an k e AA ai d e x iong m ao . _|0 3 3 2 2 3 3 4 4 4 4 3 3 4 4 5 5 2 2 1 1 0 0|1 2 2 2 2 2 2 2 2 2 2 1 1
0001_000419|0001_Angry|ZH|以后不要喝那么多了,伤身体.|_ y i h ou b u y ao h e n a m e d uo l e , sh ang sh en t i . _|0 3 3 4 4 2 2 4 4 1 1 4 4 5 5 1 1 5 5 0 1 1 1 1 3 3 0 0|1 2 2 2 2 2 2 2 2 2 1 2 2 2 1 1
0001_000633|0001_Angry|ZH|我想所有中国人都会打乒乓球.|_ w o x iang s uo y ou zh ong g uo r en d ou h ui d a p ing p ang q iu . _|0 2 2 3 3 2 2 3 3 1 1 2 2 2 2 1 1 4 4 3 3 1 1 1 1 2 2 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000627|0001_Angry|ZH|是的,所以我永不喝它的.|_ sh ir d e , s uo y i w o y ong b u h e t a d e . _|0 4 4 5 5 0 2 2 2 2 3 3 3 3 4 4 1 1 1 1 5 5 0 0|1 2 2 1 2 2 2 2 2 2 2 2 1 1
0001_000626|0001_Angry|ZH|我当然喜欢,我很注意颜面.|_ w o d ang r an x i h uan , w o h en zh u y i y En m ian . _|0 3 3 1 1 2 2 3 3 5 5 0 2 2 3 3 4 4 4 4 2 2 4 4 0 0|1 2 2 2 2 2 1 2 2 2 2 2 2 1 1
0001_000632|0001_Angry|ZH|有些人划船,有的人在进行花草活动|_ y ou x ie r en h ua ch uan , y ou d e r en z ai j in x ing h ua c ao h uo d ong _|0 3 3 1 1 2 2 2 2 2 2 0 3 3 5 5 2 2 4 4 4 4 2 2 1 1 3 3 2 2 4 4 0|1 2 2 2 2 2 1 2 2 2 2 2 2 2 2 2 2 1
0001_000418|0001_Angry|ZH|我应该给女朋友买玫瑰花的.|_ w o y ing g ai g ei n v p eng y ou m ai m ei g ui h ua d e . _|0 3 3 1 1 1 1 3 3 3 3 2 2 5 5 3 3 2 2 5 5 1 1 5 5 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000424|0001_Angry|ZH|今年应该是第二十七个教师节.|_ j in n ian y ing g ai sh ir d i EE er sh ir q i g e j iao sh ir j ie . _|0 1 1 2 2 1 1 1 1 4 4 4 4 4 4 2 2 1 1 5 5 4 4 1 1 2 2 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000430|0001_Angry|ZH|看呀,我们差不多就装饰好了.|_ k an y a , w o m en ch a b u d uo j iu zh uang sh ir h ao l e . _|0 4 4 5 5 0 3 3 5 5 4 4 5 5 1 1 4 4 1 1 4 4 3 3 5 5 0 0|1 2 2 1 2 2 2 2 2 2 2 2 2 2 1 1
0001_000578|0001_Angry|ZH|好的.新的音乐厅有一场音乐会.|_ h ao d e . x in d e y in y ve t ing y ou y i ch ang y in y ve h ui . _|0 3 3 5 5 0 1 1 5 5 1 1 4 4 1 1 3 3 4 4 3 3 1 1 4 4 4 4 0 0|1 2 2 1 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000550|0001_Angry|ZH|我已经习惯这种气候了.|_ w o y i j ing x i g uan zh e zh ong q i h ou l e . _|0 2 2 3 3 1 1 2 2 4 4 4 4 3 3 4 4 4 4 5 5 0 0|1 2 2 2 2 2 2 2 2 2 2 1 1
0001_000544|0001_Angry|ZH|炖肉一小时,剩余三十分钟十八秒.|_ d un r ou y i x iao sh ir , sh eng y v s an sh ir f en zh ong sh ir b a m iao . _|0 4 4 4 4 4 4 3 3 2 2 0 4 4 2 2 1 1 2 2 1 1 1 1 2 2 1 1 3 3 0 0|1 2 2 2 2 2 1 2 2 2 2 2 2 2 2 2 1 1
0001_000593|0001_Angry|ZH|那样的话你应该穿讲究一点.|_ n a y ang d e h ua n i y ing g ai ch uan j iang j iu y i d ian . _|0 4 4 4 4 5 5 4 4 3 3 1 1 1 1 1 1 3 3 5 5 4 4 3 3 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000587|0001_Angry|ZH|雪下得真大,带着我去购物.|_ x ve x ia d e zh en d a , d ai zh e w o q v g ou w u . _|0 3 3 4 4 5 5 1 1 4 4 0 4 4 5 5 3 3 4 4 4 4 4 4 0 0|1 2 2 2 2 2 1 2 2 2 2 2 2 1 1
0001_000523|0001_Angry|ZH|一套古瓷器.它真的很珍贵.|_ y i t ao g u c i0 q i . t a zh en d e h en zh en g ui . _|0 2 2 4 4 3 3 2 2 4 4 0 1 1 1 1 5 5 3 3 1 1 4 4 0 0|1 2 2 2 2 2 1 2 2 2 2 2 2 1 1
0001_000537|0001_Angry|ZH|我们一起为他办个惊喜派对.|_ w o m en y i q i w ei t a b an g e j ing x i p ai d ui . _|0 3 3 5 5 4 4 3 3 4 4 1 1 4 4 5 5 1 1 3 3 4 4 4 4 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000494|0001_Angry|ZH|节食减肥很痛苦.|_ j ie sh ir j ian f ei h en t ong k u . _|0 2 2 2 2 3 3 2 2 3 3 4 4 3 3 0 0|1 2 2 2 2 2 2 2 1 1
0001_000480|0001_Angry|ZH|我的希望是工作到倒下的那一天.|_ w o d e x i w ang sh ir g ong z uo d ao d ao x ia d e n a y i t ian . _|0 3 3 5 5 1 1 4 4 4 4 1 1 4 4 4 4 3 3 4 4 5 5 4 4 4 4 1 1 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000457|0001_Angry|ZH|我的表两点四十二.可是它有点快.|_ w o d e b iao l iang d ian s i0 sh ir EE er . k e sh ir t a y ou d ian k uai . _|0 3 3 5 5 3 3 2 2 3 3 4 4 2 2 4 4 0 3 3 4 4 1 1 2 2 3 3 4 4 0 0|1 2 2 2 2 2 2 2 2 1 2 2 2 2 2 2 1 1
0001_000443|0001_Angry|ZH|别不好意思.再多吃些鸡肉.|_ b ie b u h ao y i s i0 . z ai d uo ch ir x ie j i r ou . _|0 2 2 4 4 3 3 4 4 5 5 0 4 4 1 1 1 1 1 1 1 1 4 4 0 0|1 2 2 2 2 2 1 2 2 2 2 2 2 1 1
0001_000696|0001_Angry|ZH|好好休息一下,这个小木棍叫梯.|_ h ao h ao x iu x i y i x ia , zh e g e x iao m u g un j iao t i . _|0 2 2 3 3 1 1 5 5 2 2 4 4 0 4 4 5 5 3 3 4 4 4 4 4 4 1 1 0 0|1 2 2 2 2 2 2 1 2 2 2 2 2 2 2 1 1
0001_000682|0001_Angry|ZH|我想要那种新款的美国兵款式.|_ w o x iang y ao n a zh ong x in k uan d e m ei g uo b ing k uan sh ir . _|0 2 2 3 3 4 4 4 4 3 3 1 1 3 3 5 5 3 3 2 2 1 1 3 3 4 4 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000669|0001_Angry|ZH|家里有全自动洗衣机.|_ j ia l i y ou q van z i0 d ong x i y i j i . _|0 1 1 3 3 3 3 2 2 4 4 4 4 3 3 1 1 1 1 0 0|1 2 2 2 2 2 2 2 2 2 1 1
0001_000655|0001_Angry|ZH|我支持你.它是需要重做.|_ w o zh ir ch ir n i . t a sh ir x v y ao zh ong z uo . _|0 3 3 1 1 2 2 3 3 0 1 1 4 4 1 1 4 4 4 4 4 4 0 0|1 2 2 2 2 1 2 2 2 2 2 2 1 1
0001_000641|0001_Angry|ZH|在法国南部,气候常年舒适宜人.|_ z ai f a g uo n an b u , q i h ou ch ang n ian sh u sh ir y i r en . _|0 4 4 3 3 2 2 2 2 4 4 0 4 4 4 4 2 2 2 2 1 1 4 4 2 2 2 2 0 0|1 2 2 2 2 2 1 2 2 2 2 2 2 2 2 1 1
0001_000640|0001_Angry|ZH|还有聊天记录.|_ h ai y ou l iao t ian j i l u . _|0 2 2 3 3 2 2 1 1 4 4 4 4 0 0|1 2 2 2 2 2 2 1 1
0001_000654|0001_Angry|ZH|我刚从苏格兰回来.|_ w o g ang c ong s u g e l an h ui l ai . _|0 3 3 1 1 2 2 1 1 2 2 2 2 2 2 5 5 0 0|1 2 2 2 2 2 2 2 2 1 1
0001_000668|0001_Angry|ZH|下午好,蒂娜,我想我问错人了.|_ x ia w u h ao , d i n a , w o x iang w o w en c uo r en l e . _|0 4 4 3 3 3 3 0 4 4 4 4 0 3 3 2 2 3 3 4 4 4 4 2 2 5 5 0 0|1 2 2 2 1 2 2 1 2 2 2 2 2 2 2 1 1
0001_000683|0001_Angry|ZH|错过这村可就没这个店了.|_ c uo g uo zh e c un k e j iu m ei zh e g e d ian l e . _|0 4 4 4 4 4 4 1 1 3 3 4 4 2 2 4 4 5 5 4 4 5 5 0 0|1 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000697|0001_Angry|ZH|这两块是唐朝不同时期铸造的.|_ zh e l iang k uai sh ir t ang ch ao b u t ong sh ir q i zh u z ao d e . _|0 4 4 3 3 4 4 4 4 2 2 2 2 4 4 2 2 2 2 1 1 4 4 4 4 5 5 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000442|0001_Angry|ZH|不会这么凑巧吧!我也是十六.|_ b u h ui zh e m e c ou q iao b a ! w o y E sh ir sh ir l iu . _|0 2 2 4 4 4 4 5 5 4 4 3 3 5 5 0 2 2 3 3 4 4 2 2 4 4 0 0|1 2 2 2 2 2 2 2 1 2 2 2 2 2 1 1
0001_000456|0001_Angry|ZH|做不了什么,通常我会保持沉默.|_ z uo b u l iao sh en m e , t ong ch ang w o h ui b ao ch ir ch en m o . _|0 4 4 5 5 3 3 2 2 5 5 0 1 1 2 2 3 3 4 4 3 3 2 2 2 2 4 4 0 0|1 2 2 2 2 2 1 2 2 2 2 2 2 2 2 1 1
0001_000481|0001_Angry|ZH|吝啬鬼!他每天还骑自行车上学!|_ l in s e g ui ! t a m ei t ian h ai q i z i0 x ing ch e sh ang x ve ! _|0 4 4 4 4 3 3 0 1 1 3 3 1 1 2 2 2 2 4 4 2 2 1 1 4 4 2 2 0 0|1 2 2 2 1 2 2 2 2 2 2 2 2 2 2 1 1
0001_000495|0001_Angry|ZH|听大自然的声响,就像听音乐一样!|_ t ing d a z i0 r an d e sh eng x iang , j iu x iang t ing y in y ve y i y ang ! _|0 1 1 4 4 4 4 2 2 5 5 1 1 3 3 0 4 4 4 4 1 1 1 1 4 4 2 2 4 4 0 0|1 2 2 2 2 2 2 2 1 2 2 2 2 2 2 2 1 1
0001_000536|0001_Angry|ZH|软妹子生气会说,讨厌,不理你啦.|_ r uan m ei z i0 sh eng q i h ui sh uo , t ao y En , b u l i n i l a . _|0 3 3 4 4 5 5 1 1 4 4 4 4 1 1 0 3 3 4 4 0 4 4 3 3 3 3 5 5 0 0|1 2 2 2 2 2 2 2 1 2 2 1 2 2 2 2 1 1
0001_000522|0001_Angry|ZH|我是个学生,服务器响应超时.|_ w o sh ir g e x ve sh eng , f u w u q i x iang y ing ch ao sh ir . _|0 3 3 4 4 5 5 2 2 5 5 0 2 2 4 4 4 4 3 3 4 4 1 1 2 2 0 0|1 2 2 2 2 2 1 2 2 2 2 2 2 2 1 1
0001_000508|0001_Angry|ZH|我的性格就是冷静并且客观.|_ w o d e x ing g e j iu sh ir l eng j ing b ing q ie k e g uan . _|0 3 3 5 5 4 4 2 2 4 4 4 4 3 3 4 4 4 4 3 3 4 4 1 1 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000534|0001_Angry|ZH|二零一六年十一月五号是星期六.|_ EE er l ing y i l iu n ian sh ir y i y ve w u h ao sh ir x ing q i l iu . _|0 4 4 2 2 1 1 4 4 2 2 2 2 2 2 4 4 3 3 4 4 4 4 1 1 1 1 4 4 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000520|0001_Angry|ZH|这样你就有时间挥拍打球了.|_ zh e y ang n i j iu y ou sh ir j ian h ui p ai d a q iu l e . _|0 4 4 4 4 3 3 4 4 3 3 2 2 1 1 1 1 1 1 3 3 2 2 5 5 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000483|0001_Angry|ZH|是不是依然觉得我很可爱.|_ sh ir b u sh ir y i r an j ve d e w o h en k e AA ai . _|0 4 4 5 5 4 4 1 1 2 2 2 2 5 5 2 2 3 3 3 3 4 4 0 0|1 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000497|0001_Angry|ZH|不知道.或许一双新鞋.|_ b u zh ir d ao . h uo x v y i sh uang x in x ie . _|0 4 4 1 1 4 4 0 4 4 3 3 4 4 1 1 1 1 2 2 0 0|1 2 2 2 1 2 2 2 2 2 2 1 1
0001_000468|0001_Angry|ZH|你的同学把你给捉弄了吧.|_ n i d e t ong x ve b a n i g ei zh uo n ong l e b a . _|0 3 3 5 5 2 2 2 2 3 3 2 2 3 3 1 1 4 4 5 5 5 5 0 0|1 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000440|0001_Angry|ZH|还不太糟糕,但是得躺在床上.|_ h ai b u t ai z ao g ao , d an sh ir d e t ang z ai ch uang sh ang . _|0 2 2 2 2 4 4 1 1 1 1 0 4 4 4 4 5 5 3 3 4 4 2 2 4 4 0 0|1 2 2 2 2 2 1 2 2 2 2 2 2 2 1 1
0001_000454|0001_Angry|ZH|没有找到蒸鱼的计时.|_ m ei y ou zh ao d ao zh eng y v d e j i sh ir . _|0 2 2 3 3 3 3 4 4 1 1 2 2 5 5 4 4 2 2 0 0|1 2 2 2 2 2 2 2 2 2 1 1
0001_000681|0001_Angry|ZH|于是我就问她能不能连我的票买了.|_ y v sh ir w o j iu w en t a n eng b u n eng l ian w o d e p iao m ai l e . _|0 2 2 4 4 3 3 4 4 4 4 1 1 2 2 4 4 2 2 2 2 3 3 5 5 4 4 3 3 5 5 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000695|0001_Angry|ZH|别总是闲着,找点事情干.|_ b ie z ong sh ir x ian zh e , zh ao d ian sh ir q ing g an . _|0 2 2 3 3 4 4 2 2 5 5 0 2 2 3 3 4 4 5 5 4 4 0 0|1 2 2 2 2 2 1 2 2 2 2 2 1 1
0001_000642|0001_Angry|ZH|哪天我也许得和他谈谈.|_ n a t ian w o y E x v d e h e t a t an t an . _|0 3 3 1 1 3 3 2 2 3 3 5 5 2 2 1 1 2 2 5 5 0 0|1 2 2 2 2 2 2 2 2 2 2 1 1
0001_000656|0001_Angry|ZH|我在一个机械化农场做工程师.|_ w o z ai y i g e j i x ie h ua n ong ch ang z uo g ong ch eng sh ir . _|0 3 3 4 4 2 2 5 5 1 1 4 4 4 4 2 2 3 3 4 4 1 1 2 2 1 1 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000657|0001_Angry|ZH|有时内在美更加重要.|_ y ou sh ir n ei z ai m ei g eng j ia zh ong y ao . _|0 3 3 2 2 4 4 4 4 3 3 4 4 1 1 4 4 4 4 0 0|1 2 2 2 2 2 2 2 2 2 1 1
0001_000643|0001_Angry|ZH|振作点儿,我看了屏幕显示!|_ zh en z uo d ian EE er , w o k an l e p ing m u x ian sh ir ! _|0 4 4 4 4 3 3 2 2 0 3 3 4 4 5 5 2 2 4 4 3 3 4 4 0 0|1 2 2 2 2 1 2 2 2 2 2 2 2 1 1
0001_000694|0001_Angry|ZH|很漂亮,不过人多拥挤.|_ h en p iao l iang , b u g uo r en d uo y ong j i . _|0 3 3 4 4 5 5 0 2 2 4 4 2 2 1 1 1 1 3 3 0 0|1 2 2 2 1 2 2 2 2 2 2 1 1
0001_000680|0001_Angry|ZH|我们相处得很好,仅此而已.|_ w o m en x iang ch u d e h en h ao , j in c i0 EE er y i . _|0 3 3 5 5 1 1 3 3 5 5 2 2 3 3 0 2 2 3 3 2 2 3 3 0 0|1 2 2 2 2 2 2 2 1 2 2 2 2 1 1
0001_000455|0001_Angry|ZH|我们俩合不来,还经常吵架.|_ w o m en l ia h e b u l ai , h ai j ing ch ang ch ao j ia . _|0 3 3 5 5 3 3 2 2 5 5 2 2 0 2 2 1 1 2 2 3 3 4 4 0 0|1 2 2 2 2 2 2 1 2 2 2 2 2 1 1
0001_000441|0001_Angry|ZH|如果有我能帮忙的请告诉我.|_ r u g uo y ou w o n eng b ang m ang d e q ing g ao s u w o . _|0 2 2 3 3 2 2 3 3 2 2 1 1 2 2 5 5 3 3 4 4 5 5 3 3 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000469|0001_Angry|ZH|不过我想星期五走,|_ b u g uo w o x iang x ing q i w u z ou , _|0 2 2 4 4 2 2 3 3 1 1 1 1 3 3 3 3 0 0|1 2 2 2 2 2 2 2 2 1 1
0001_000496|0001_Angry|ZH|现在,我仍然有点紧张.|_ x ian z ai , w o r eng r an y ou d ian j in zh ang . _|0 4 4 4 4 0 3 3 2 2 2 2 2 2 3 3 3 3 1 1 0 0|1 2 2 1 2 2 2 2 2 2 2 1 1
0001_000482|0001_Angry|ZH|是你最牵挂的那个女人.|_ sh ir n i z ui q ian g ua d e n a g e n v r en . _|0 4 4 3 3 4 4 1 1 4 4 5 5 4 4 5 5 3 3 2 2 0 0|1 2 2 2 2 2 2 2 2 2 2 1 1
0001_000521|0001_Angry|ZH|你这个小气鬼,很不幸,非常少.|_ n i zh e g e x iao q i g ui , h en b u x ing , f ei ch ang sh ao . _|0 3 3 4 4 5 5 3 3 5 5 3 3 0 3 3 2 2 4 4 0 1 1 2 2 3 3 0 0|1 2 2 2 2 2 2 1 2 2 2 1 2 2 2 1 1
0001_000535|0001_Angry|ZH|今天真凉快,我希望主队输掉.|_ j in t ian zh en l iang k uai , w o x i w ang zh u d ui sh u d iao . _|0 1 1 1 1 1 1 2 2 5 5 0 3 3 1 1 4 4 3 3 4 4 1 1 4 4 0 0|1 2 2 2 2 2 1 2 2 2 2 2 2 2 1 1
0001_000509|0001_Angry|ZH|我不会牺牲我的健康来换取金钱的.|_ w o b u h ui x i sh eng w o d e j ian k ang l ai h uan q v j in q ian d e . _|0 3 3 2 2 4 4 1 1 1 1 3 3 5 5 4 4 1 1 2 2 4 4 3 3 1 1 2 2 5 5 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000531|0001_Angry|ZH|时间对珍尼来说是没有用的.|_ sh ir j ian d ui zh en n i l ai sh uo sh ir m ei y ou y ong d e . _|0 2 2 1 1 4 4 1 1 2 2 2 2 1 1 4 4 2 2 3 3 4 4 5 5 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000525|0001_Angry|ZH|她此刻失业了,你最好不要惹她.|_ t a c i0 k e sh ir y E l e , n i z ui h ao b u y ao r e t a . _|0 1 1 3 3 4 4 1 1 4 4 5 5 0 3 3 4 4 3 3 2 2 4 4 3 3 1 1 0 0|1 2 2 2 2 2 2 1 2 2 2 2 2 2 2 1 1
0001_000519|0001_Angry|ZH|让我再想想,真相已经上传了.|_ r ang w o z ai x iang x iang , zh en x iang y i j ing sh ang ch uan l e . _|0 4 4 3 3 4 4 3 3 5 5 0 1 1 4 4 3 3 1 1 4 4 2 2 5 5 0 0|1 2 2 2 2 2 1 2 2 2 2 2 2 2 1 1
0001_000486|0001_Angry|ZH|我喜欢几乎所有的运动,|_ w o x i h uan j i h u s uo y ou d e y vn d ong , _|0 2 2 3 3 5 5 1 1 1 1 2 2 3 3 5 5 4 4 4 4 0 0|1 2 2 2 2 2 2 2 2 2 2 1 1
0001_000492|0001_Angry|ZH|是啊,我还是个乳臭未干的小记者.|_ sh ir AA a , w o h ai sh ir g e r u x iu w ei g an d e x iao j i zh e . _|0 4 4 5 5 0 3 3 2 2 4 4 5 5 3 3 4 4 4 4 1 1 5 5 3 3 4 4 3 3 0 0|1 2 2 1 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000445|0001_Angry|ZH|我倒是有一个爱好收藏古董.|_ w o d ao sh ir y ou y i g e AA ai h ao sh ou c ang g u d ong . _|0 3 3 4 4 4 4 3 3 2 2 5 5 4 4 4 4 1 1 2 2 2 2 3 3 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000451|0001_Angry|ZH|很快,车就可自动开了.|_ h en k uai , ch e j iu k e z i0 d ong k ai l e . _|0 3 3 4 4 0 1 1 4 4 3 3 4 4 4 4 1 1 5 5 0 0|1 2 2 1 2 2 2 2 2 2 2 1 1
0001_000479|0001_Angry|ZH|对别人没有,而对我就有.|_ d ui b ie r en m ei y ou , EE er d ui w o j iu y ou . _|0 4 4 2 2 2 2 2 2 3 3 0 2 2 4 4 3 3 4 4 3 3 0 0|1 2 2 2 2 2 1 2 2 2 2 2 1 1
0001_000684|0001_Angry|ZH|我曾经养过,我太高兴了.|_ w o c eng j ing y ang g uo , w o t ai g ao x ing l e . _|0 3 3 2 2 1 1 3 3 4 4 0 3 3 4 4 1 1 4 4 5 5 0 0|1 2 2 2 2 2 1 2 2 2 2 2 1 1
0001_000690|0001_Angry|ZH|每天晚上跟你互道晚安真幸福.|_ m ei t ian w an sh ang g en n i h u d ao w an AA an zh en x ing f u . _|0 3 3 1 1 3 3 4 4 1 1 3 3 4 4 4 4 3 3 1 1 1 1 4 4 5 5 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000647|0001_Angry|ZH|三个,两个儿子一个女儿.|_ s an g e , l iang g e EE er z i0 y i g e n v EE er . _|0 1 1 5 5 0 3 3 5 5 2 2 5 5 2 2 5 5 3 3 2 2 0 0|1 2 2 1 2 2 2 2 2 2 2 2 1 1
0001_000653|0001_Angry|ZH|我一直到清晨四点才到家,|_ w o y i zh ir d ao q ing ch en s i0 d ian c ai d ao j ia , _|0 3 3 4 4 2 2 4 4 1 1 2 2 4 4 3 3 2 2 4 4 1 1 0 0|1 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000652|0001_Angry|ZH|我希望你能和我一起想派对点子.|_ w o x i w ang n i n eng h e w o y i q i x iang p ai d ui d ian z i0 . _|0 3 3 1 1 4 4 3 3 2 2 2 2 3 3 4 4 3 3 3 3 4 4 4 4 3 3 5 5 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000646|0001_Angry|ZH|赌博往往是个祸根,|_ d u b o w ang w ang sh ir g e h uo g en , _|0 3 3 2 2 2 2 3 3 4 4 5 5 4 4 1 1 0 0|1 2 2 2 2 2 2 2 2 1 1
0001_000691|0001_Angry|ZH|我会在你的脸上画鬼脸.|_ w o h ui z ai n i d e l ian sh ang h ua g ui l ian . _|0 3 3 4 4 4 4 3 3 5 5 3 3 5 5 4 4 2 2 3 3 0 0|1 2 2 2 2 2 2 2 2 2 2 1 1
0001_000685|0001_Angry|ZH|他们将于今年夏天结婚.|_ t a m en j iang y v j in n ian x ia t ian j ie h un . _|0 1 1 5 5 1 1 2 2 1 1 2 2 4 4 1 1 2 2 1 1 0 0|1 2 2 2 2 2 2 2 2 2 2 1 1
0001_000478|0001_Angry|ZH|这些颜色也不太适合你.|_ zh e x ie y En s e y E b u t ai sh ir h e n i . _|0 4 4 1 1 2 2 4 4 3 3 2 2 4 4 4 4 2 2 3 3 0 0|1 2 2 2 2 2 2 2 2 2 2 1 1
0001_000450|0001_Angry|ZH|就经常去我们宿舍附近的酒吧.|_ j iu j ing ch ang q v w o m en s u sh e f u j in d e j iu b a . _|0 4 4 1 1 2 2 4 4 3 3 5 5 4 4 4 4 4 4 4 4 5 5 3 3 5 5 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000444|0001_Angry|ZH|很神奇的样子,我搞不懂为什么.|_ h en sh en q i d e y ang z i0 , w o g ao b u d ong w ei sh en m e . _|0 3 3 2 2 2 2 5 5 4 4 5 5 0 3 3 3 3 5 5 3 3 4 4 2 2 5 5 0 0|1 2 2 2 2 2 2 1 2 2 2 2 2 2 2 1 1
0001_000493|0001_Angry|ZH|女孩的心思你别猜,但是我不用猜.|_ n v h ai d e x in s i0 n i b ie c ai , d an sh ir w o b u y ong c ai . _|0 3 3 2 2 5 5 1 1 5 5 3 3 2 2 1 1 0 4 4 4 4 3 3 2 2 4 4 1 1 0 0|1 2 2 2 2 2 2 2 2 1 2 2 2 2 2 2 1 1
0001_000487|0001_Angry|ZH|也许能帮助你把事情弄清楚.|_ y E x v n eng b ang zh u n i b a sh ir q ing n ong q ing ch u . _|0 2 2 3 3 2 2 1 1 4 4 2 2 3 3 4 4 5 5 4 4 1 1 5 5 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000518|0001_Angry|ZH|你得先回答我,你最喜欢谁.|_ n i d e x ian h ui d a w o , n i z ui x i h uan sh ui . _|0 3 3 5 5 1 1 2 2 2 2 3 3 0 3 3 4 4 3 3 5 5 2 2 0 0|1 2 2 2 2 2 2 1 2 2 2 2 2 1 1
0001_000524|0001_Angry|ZH|他在这次竞选活动中花了数百万,|_ t a z ai zh e c i0 j ing x van h uo d ong zh ong h ua l e sh u b ai w an , _|0 1 1 4 4 4 4 4 4 4 4 3 3 2 2 4 4 1 1 1 1 5 5 4 4 3 3 4 4 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000530|0001_Angry|ZH|冬天雨非常多.我不喜欢雨天.|_ d ong t ian y v f ei ch ang d uo . w o b u x i h uan y v t ian . _|0 1 1 1 1 3 3 1 1 2 2 1 1 0 3 3 4 4 3 3 5 5 3 3 1 1 0 0|1 2 2 2 2 2 2 1 2 2 2 2 2 2 1 1
0001_000526|0001_Angry|ZH|带上你的家人,但是他有丑闻.|_ d ai sh ang n i d e j ia r en , d an sh ir t a y ou ch ou w en . _|0 4 4 4 4 3 3 5 5 1 1 2 2 0 4 4 4 4 1 1 2 2 3 3 2 2 0 0|1 2 2 2 2 2 2 1 2 2 2 2 2 2 1 1
0001_000532|0001_Angry|ZH|大概足够支持我生活三个月的.|_ d a g ai z u g ou zh ir ch ir w o sh eng h uo s an g e y ve d e . _|0 4 4 4 4 2 2 4 4 1 1 2 2 3 3 1 1 2 2 1 1 5 5 4 4 5 5 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000491|0001_Angry|ZH|你可以去问鹦鹉啊,鹦鹉会说话.|_ n i k e y i q v w en y ing w u AA a , y ing w u h ui sh uo h ua . _|0 3 3 2 2 3 3 4 4 4 4 1 1 3 3 5 5 0 1 1 3 3 4 4 1 1 4 4 0 0|1 2 2 2 2 2 2 2 2 1 2 2 2 2 2 1 1
0001_000485|0001_Angry|ZH|我要学习一下相关知识.|_ w o y ao x ve x i y i x ia x iang g uan zh ir sh ir . _|0 3 3 4 4 2 2 2 2 2 2 4 4 1 1 1 1 1 1 5 5 0 0|1 2 2 2 2 2 2 2 2 2 2 1 1
0001_000452|0001_Angry|ZH|我昨天遇到马克,他看起来很忧郁.|_ w o z uo t ian y v d ao m a k e , t a k an q i l ai h en y ou y v . _|0 3 3 2 2 1 1 4 4 4 4 3 3 4 4 0 1 1 4 4 3 3 5 5 3 3 1 1 4 4 0 0|1 2 2 2 2 2 2 2 1 2 2 2 2 2 2 2 1 1
0001_000446|0001_Angry|ZH|别小看我这发型!我还蛮喜欢的.|_ b ie x iao k an w o zh e f a x ing ! w o h ai m an x i h uan d e . _|0 2 2 3 3 4 4 3 3 4 4 4 4 2 2 0 3 3 2 2 2 2 3 3 5 5 5 5 0 0|1 2 2 2 2 2 2 2 1 2 2 2 2 2 2 1 1
0001_000693|0001_Angry|ZH|许多白领都参加到这个游戏里面,|_ x v d uo b ai l ing d ou c an j ia d ao zh e g e y ou x i l i m ian , _|0 3 3 1 1 2 2 3 3 1 1 1 1 1 1 4 4 4 4 5 5 2 2 4 4 3 3 4 4 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000687|0001_Angry|ZH|你看起来很高兴,眼睛闪闪发亮.|_ n i k an q i l ai h en g ao x ing , y En j ing sh an sh an f a l iang . _|0 3 3 4 4 3 3 5 5 3 3 1 1 4 4 0 3 3 5 5 3 3 5 5 1 1 4 4 0 0|1 2 2 2 2 2 2 2 1 2 2 2 2 2 2 1 1
0001_000650|0001_Angry|ZH|这个我相信,我是登山爱好者.|_ zh e g e w o x iang x in , w o sh ir d eng sh an AA ai h ao zh e . _|0 4 4 5 5 3 3 1 1 4 4 0 3 3 4 4 1 1 1 1 4 4 4 4 3 3 0 0|1 2 2 2 2 2 1 2 2 2 2 2 2 2 1 1
0001_000644|0001_Angry|ZH|我是银灰色的,我都被你说饿了.|_ w o sh ir y in h ui s e d e , w o d ou b ei n i sh uo EE e l e . _|0 3 3 4 4 2 2 1 1 4 4 5 5 0 3 3 1 1 4 4 3 3 1 1 4 4 5 5 0 0|1 2 2 2 2 2 2 1 2 2 2 2 2 2 2 1 1
0001_000678|0001_Angry|ZH|太棒了,我们下午可以在湖里划船.|_ t ai b ang l e , w o m en x ia w u k e y i z ai h u l i h ua ch uan . _|0 4 4 4 4 5 5 0 3 3 5 5 4 4 3 3 2 2 3 3 4 4 2 2 5 5 2 2 2 2 0 0|1 2 2 2 1 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000679|0001_Angry|ZH|但是有时夏天比其它季节更迷人.|_ d an sh ir y ou sh ir x ia t ian b i q i t a j i j ie g eng m i r en . _|0 4 4 4 4 3 3 2 2 4 4 1 1 3 3 2 2 1 1 4 4 2 2 4 4 2 2 2 2 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000645|0001_Angry|ZH|文学和经济,我喜欢很多著作.|_ w en x ve h e j ing j i , w o x i h uan h en d uo zh u z uo . _|0 2 2 2 2 2 2 1 1 4 4 0 2 2 3 3 5 5 3 3 1 1 4 4 4 4 0 0|1 2 2 2 2 2 1 2 2 2 2 2 2 2 1 1
0001_000651|0001_Angry|ZH|播放歌单收藏,脑筋可动得真快.|_ b o f ang g e d an sh ou c ang , n ao j in k e d ong d e zh en k uai . _|0 1 1 4 4 1 1 1 1 1 1 2 2 0 3 3 1 1 3 3 4 4 5 5 1 1 4 4 0 0|1 2 2 2 2 2 2 1 2 2 2 2 2 2 2 1 1
0001_000686|0001_Angry|ZH|谢谢你的夸奖,鲍伯上年纪了.|_ x ie x ie n i d e k ua j iang , b ao b o sh ang n ian j i l e . _|0 4 4 5 5 3 3 5 5 1 1 3 3 0 4 4 2 2 4 4 2 2 4 4 5 5 0 0|1 2 2 2 2 2 2 1 2 2 2 2 2 2 1 1
0001_000692|0001_Angry|ZH|我缺钱用,所以上星期把它当了.|_ w o q ve q ian y ong , s uo y i sh ang x ing q i b a t a d ang l e . _|0 3 3 1 1 2 2 4 4 0 2 2 3 3 4 4 1 1 1 1 3 3 1 1 1 1 5 5 0 0|1 2 2 2 2 1 2 2 2 2 2 2 2 2 2 1 1
0001_000447|0001_Angry|ZH|你女儿和她妈妈长得很像.|_ n i n v EE er h e t a m a m a zh ang d e h en x iang . _|0 2 2 3 3 2 2 2 2 1 1 1 1 5 5 3 3 5 5 3 3 4 4 0 0|1 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000453|0001_Angry|ZH|感觉好温暖呀,好的,一会儿见.|_ g an j ve h ao w en n uan y a , h ao d e , y i h ui EE er j ian . _|0 3 3 2 2 3 3 1 1 3 3 5 5 0 3 3 5 5 0 2 2 4 4 5 5 4 4 0 0|1 2 2 2 2 2 2 1 2 2 1 2 2 2 2 1 1
0001_000484|0001_Angry|ZH|多教我些东西我会更聪明.|_ d uo j iao w o x ie d ong x i w o h ui g eng c ong m ing . _|0 1 1 4 4 3 3 1 1 1 1 5 5 3 3 4 4 4 4 1 1 5 5 0 0|1 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000490|0001_Angry|ZH|我也知道自己是大嘴巴.|_ w o y E zh ir d ao z i0 j i sh ir d a z ui b a . _|0 2 2 3 3 1 1 4 4 4 4 3 3 4 4 4 4 3 3 5 5 0 0|1 2 2 2 2 2 2 2 2 2 2 1 1
0001_000533|0001_Angry|ZH|你绝对猜不到她准备要孩子了.|_ n i j ve d ui c ai b u d ao t a zh un b ei y ao h ai z i0 l e . _|0 3 3 2 2 4 4 1 1 2 2 4 4 1 1 3 3 4 4 4 4 2 2 5 5 5 5 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000527|0001_Angry|ZH|你在我的心里折腾好久了.|_ n i z ai w o d e x in l i zh e t eng h ao j iu l e . _|0 3 3 4 4 3 3 5 5 1 1 5 5 1 1 5 5 2 2 3 3 5 5 0 0|1 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000700|0001_Angry|ZH|是很难听的脏话,主人可别学了.|_ sh ir h en n an t ing d e z ang h ua , zh u r en k e b ie x ve l e . _|0 4 4 3 3 2 2 1 1 5 5 1 1 4 4 0 3 3 2 2 3 3 2 2 2 2 5 5 0 0|1 2 2 2 2 2 2 2 1 2 2 2 2 2 2 1 1
0001_000502|0001_Angry|ZH|小心脚下.人行道上有个坑.|_ x iao x in j iao x ia . r en x ing d ao sh ang y ou g e k eng . _|0 3 3 1 1 3 3 5 5 0 2 2 2 2 4 4 4 4 3 3 5 5 1 1 0 0|1 2 2 2 2 1 2 2 2 2 2 2 2 1 1
0001_000516|0001_Angry|ZH|我想那些应该是草莓的种子.|_ w o x iang n a x ie y ing g ai sh ir c ao m ei d e zh ong z i0 . _|0 2 2 3 3 4 4 1 1 1 1 1 1 4 4 3 3 2 2 5 5 3 3 5 5 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000489|0001_Angry|ZH|他们的配合值得我们学习|_ t a m en d e p ei h e zh ir d e w o m en x ve x i _|0 1 1 5 5 5 5 4 4 2 2 2 2 5 5 3 3 5 5 2 2 2 2 0|1 2 2 2 2 2 2 2 2 2 2 2 1
0001_000476|0001_Angry|ZH|不是,他住在沃斯盾的老房子里.|_ b u sh ir , t a zh u z ai w o s i0 d un d e l ao f ang z i0 l i . _|0 2 2 4 4 0 1 1 4 4 4 4 4 4 1 1 4 4 5 5 3 3 2 2 5 5 3 3 0 0|1 2 2 1 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000462|0001_Angry|ZH|那棒极了,其实心情挺不错.|_ n a b ang j i l e , q i sh ir x in q ing t ing b u c uo . _|0 4 4 4 4 2 2 5 5 0 2 2 2 2 1 1 2 2 3 3 5 5 4 4 0 0|1 2 2 2 2 1 2 2 2 2 2 2 2 1 1
0001_000648|0001_Angry|ZH|祝你春节快乐,全家幸福安康.|_ zh u n i ch un j ie k uai l e , q van j ia x ing f u AA an k ang . _|0 4 4 3 3 1 1 2 2 4 4 4 4 0 2 2 1 1 4 4 5 5 1 1 1 1 0 0|1 2 2 2 2 2 2 1 2 2 2 2 2 2 1 1
0001_000674|0001_Angry|ZH|我喜欢吃中餐.|_ w o x i h uan ch ir zh ong c an . _|0 2 2 3 3 5 5 1 1 1 1 1 1 0 0|1 2 2 2 2 2 2 1 1
0001_000660|0001_Angry|ZH|这局我让你开,今天我不想错过.|_ zh e j v w o r ang n i k ai , j in t ian w o b u x iang c uo g uo . _|0 4 4 2 2 3 3 4 4 3 3 1 1 0 1 1 1 1 3 3 4 4 3 3 4 4 4 4 0 0|1 2 2 2 2 2 2 1 2 2 2 2 2 2 2 1 1
0001_000661|0001_Angry|ZH|我们休息一下喝杯咖啡.|_ w o m en x iu x i y i x ia h e b ei k a f ei . _|0 3 3 5 5 1 1 5 5 2 2 4 4 1 1 1 1 1 1 1 1 0 0|1 2 2 2 2 2 2 2 2 2 2 1 1
0001_000675|0001_Angry|ZH|尽管提意见,我会改正的.|_ j in g uan t i y i j ian , w o h ui g ai zh eng d e . _|0 2 2 3 3 2 2 4 4 4 4 0 3 3 4 4 3 3 4 4 5 5 0 0|1 2 2 2 2 2 1 2 2 2 2 2 1 1
0001_000649|0001_Angry|ZH|是的,我刚撞到了桌子.|_ sh ir d e , w o g ang zh uang d ao l e zh uo z i0 . _|0 4 4 5 5 0 3 3 1 1 4 4 4 4 5 5 1 1 5 5 0 0|1 2 2 1 2 2 2 2 2 2 2 1 1
0001_000463|0001_Angry|ZH|玛丽,你看来很喜欢挖苦我.|_ m a l i , n i k an l ai h en x i h uan w a k u w o . _|0 3 3 4 4 0 3 3 4 4 2 2 2 2 3 3 5 5 1 1 5 5 3 3 0 0|1 2 2 1 2 2 2 2 2 2 2 2 2 1 1
0001_000477|0001_Angry|ZH|你说我们在芝加哥要待三天的.|_ n i sh uo w o m en z ai zh ir j ia g e y ao d ai s an t ian d e . _|0 3 3 1 1 3 3 5 5 4 4 1 1 1 1 1 1 4 4 4 4 1 1 1 1 5 5 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000488|0001_Angry|ZH|我总是控制不了它.|_ w o z ong sh ir k ong zh ir b u l iao t a . _|0 2 2 3 3 4 4 4 4 4 4 4 4 3 3 1 1 0 0|1 2 2 2 2 2 2 2 2 1 1
0001_000517|0001_Angry|ZH|太妙了,我想换一些日元.|_ t ai m iao l e , w o x iang h uan y i x ie r ir y van . _|0 4 4 4 4 5 5 0 2 2 3 3 4 4 4 4 1 1 4 4 2 2 0 0|1 2 2 2 1 2 2 2 2 2 2 2 1 1
0001_000503|0001_Angry|ZH|我们还等什么|_ w o m en h ai d eng sh en m e _|0 3 3 5 5 2 2 3 3 2 2 5 5 0|1 2 2 2 2 2 2 1
0001_000529|0001_Angry|ZH|她和维克分手了,所以她申请转调.|_ t a h e w ei k e f en sh ou l e , s uo y i t a sh en q ing zh uan d iao . _|0 1 1 2 2 2 2 4 4 1 1 3 3 5 5 0 2 2 3 3 1 1 1 1 3 3 3 3 4 4 0 0|1 2 2 2 2 2 2 2 1 2 2 2 2 2 2 2 1 1
0001_000515|0001_Angry|ZH|其实我们前天已经分手了.|_ q i sh ir w o m en q ian t ian y i j ing f en sh ou l e . _|0 2 2 2 2 3 3 5 5 2 2 1 1 3 3 1 1 1 1 3 3 5 5 0 0|1 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000501|0001_Angry|ZH|我也最喜欢你,不要开枪.我投降|_ w o y E z ui x i h uan n i , b u y ao k ai q iang . w o t ou x iang _|0 2 2 3 3 4 4 3 3 5 5 3 3 0 2 2 4 4 1 1 1 1 0 3 3 2 2 2 2 0|1 2 2 2 2 2 2 1 2 2 2 2 1 2 2 2 1
0001_000449|0001_Angry|ZH|得了吧,别这么胆小啦.|_ d e l e b a , b ie zh e m e d an x iao l a . _|0 2 2 5 5 5 5 0 2 2 4 4 5 5 2 2 3 3 5 5 0 0|1 2 2 2 1 2 2 2 2 2 2 1 1
0001_000461|0001_Angry|ZH|每天早晨都是我妈妈帮他系的.|_ m ei t ian z ao ch en d ou sh ir w o m a m a b ang t a x i d e . _|0 3 3 1 1 3 3 2 2 1 1 4 4 3 3 1 1 5 5 1 1 1 1 4 4 5 5 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000475|0001_Angry|ZH|如果你想要纹身,你去纹好了.|_ r u g uo n i x iang y ao w en sh en , n i q v w en h ao l e . _|0 2 2 3 3 3 3 3 3 4 4 2 2 1 1 0 3 3 4 4 2 2 3 3 5 5 0 0|1 2 2 2 2 2 2 2 1 2 2 2 2 2 1 1
0001_000688|0001_Angry|ZH|年轻人当然要承担责任,|_ n ian q ing r en d ang r an y ao ch eng d an z e r en , _|0 2 2 1 1 2 2 1 1 2 2 4 4 2 2 1 1 2 2 4 4 0 0|1 2 2 2 2 2 2 2 2 2 2 1 1
0001_000663|0001_Angry|ZH|旅行结束后我将休息一段时间.|_ l v x ing j ie sh u h ou w o j iang x iu x i y i d uan sh ir j ian . _|0 3 3 2 2 2 2 4 4 4 4 3 3 1 1 1 1 5 5 2 2 4 4 2 2 1 1 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000677|0001_Angry|ZH|我讨厌吃醋,偶是不懂,你懂.|_ w o t ao y En ch ir c u , OO ou sh ir b u d ong , n i d ong . _|0 2 2 3 3 4 4 1 1 4 4 0 3 3 4 4 4 4 3 3 0 2 2 3 3 0 0|1 2 2 2 2 2 1 2 2 2 2 1 2 2 1 1
0001_000676|0001_Angry|ZH|这么多笑话,一天讲不完!|_ zh e m e d uo x iao h ua , y i t ian j iang b u w an ! _|0 4 4 5 5 1 1 4 4 5 5 0 4 4 1 1 3 3 4 4 2 2 0 0|1 2 2 2 2 2 1 2 2 2 2 2 1 1
0001_000662|0001_Angry|ZH|如果她拒绝我,我会死的.|_ r u g uo t a j v j ve w o , w o h ui s i0 d e . _|0 2 2 3 3 1 1 4 4 2 2 3 3 0 3 3 4 4 3 3 5 5 0 0|1 2 2 2 2 2 2 1 2 2 2 2 1 1
0001_000689|0001_Angry|ZH|不要乱问女孩子的年龄.|_ b u y ao l uan w en n v h ai z i0 d e n ian l ing . _|0 2 2 4 4 4 4 4 4 3 3 2 2 5 5 5 5 2 2 2 2 0 0|1 2 2 2 2 2 2 2 2 2 2 1 1
0001_000474|0001_Angry|ZH|是的,请返还我的钱,谢谢.|_ sh ir d e , q ing f an h uan w o d e q ian , x ie x ie . _|0 4 4 5 5 0 2 2 3 3 2 2 3 3 5 5 2 2 0 4 4 5 5 0 0|1 2 2 1 2 2 2 2 2 2 1 2 2 1 1
0001_000460|0001_Angry|ZH|自己的事情要自己做.|_ z i0 j i d e sh ir q ing y ao z i0 j i z uo . _|0 4 4 3 3 5 5 4 4 5 5 4 4 4 4 3 3 4 4 0 0|1 2 2 2 2 2 2 2 2 2 1 1
0001_000448|0001_Angry|ZH|我只会斗斗地主什么的.|_ w o zh ir h ui d ou d ou d i zh u sh en m e d e . _|0 2 2 3 3 4 4 4 4 4 4 4 4 3 3 2 2 5 5 5 5 0 0|1 2 2 2 2 2 2 2 2 2 2 1 1
0001_000500|0001_Angry|ZH|这样子比较有趣.|_ zh e y ang z i0 b i j iao y ou q v . _|0 4 4 4 4 5 5 3 3 4 4 3 3 4 4 0 0|1 2 2 2 2 2 2 2 1 1
0001_000514|0001_Angry|ZH|我曾在一家船运公司里面做过六年.|_ w o c eng z ai y i j ia ch uan y vn g ong s i0 l i m ian z uo g uo l iu n ian . _|0 3 3 2 2 4 4 4 4 1 1 2 2 4 4 1 1 1 1 3 3 4 4 4 4 5 5 4 4 2 2 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000528|0001_Angry|ZH|你转一个,我想学习下.|_ n i zh uan y i g e , w o x iang x ve x i x ia . _|0 2 2 3 3 2 2 5 5 0 2 2 3 3 2 2 2 2 4 4 0 0|1 2 2 2 2 1 2 2 2 2 2 1 1
0001_000510|0001_Angry|ZH|当然!他是我们大学的班长.|_ d ang r an ! t a sh ir w o m en d a x ve d e b an zh ang . _|0 1 1 2 2 0 1 1 4 4 3 3 5 5 4 4 2 2 5 5 1 1 3 3 0 0|1 2 2 1 2 2 2 2 2 2 2 2 2 1 1
0001_000504|0001_Angry|ZH|我还不会说其他外语,只会普通话.|_ w o h ai b u h ui sh uo q i t a w ai y v , zh ir h ui p u t ong h ua . _|0 3 3 2 2 2 2 4 4 1 1 2 2 1 1 4 4 3 3 0 3 3 4 4 3 3 1 1 4 4 0 0|1 2 2 2 2 2 2 2 2 2 1 2 2 2 2 2 1 1
0001_000538|0001_Angry|ZH|以后我要经常来这儿爬山.|_ y i h ou w o y ao j ing ch ang l ai zh e EE er p a sh an . _|0 3 3 4 4 3 3 4 4 1 1 2 2 2 2 4 4 2 2 2 2 1 1 0 0|1 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000464|0001_Angry|ZH|我也是,我还有点儿口渴.|_ w o y E sh ir , w o h ai y ou d ian EE er k ou k e . _|0 2 2 3 3 4 4 0 3 3 2 2 2 2 3 3 2 2 2 2 3 3 0 0|1 2 2 2 1 2 2 2 2 2 2 2 1 1
0001_000470|0001_Angry|ZH|你还真是考虑周到.|_ n i h ai zh en sh ir k ao l v zh ou d ao . _|0 3 3 2 2 1 1 4 4 3 3 4 4 1 1 4 4 0 0|1 2 2 2 2 2 2 2 2 1 1
0001_000458|0001_Angry|ZH|让我们看看哪一种球技比较好.|_ r ang w o m en k an k an n a y i zh ong q iu j i b i j iao h ao . _|0 4 4 3 3 5 5 4 4 5 5 3 3 4 4 3 3 2 2 4 4 3 3 4 4 3 3 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000699|0001_Angry|ZH|是的,真是名副其实.|_ sh ir d e , zh en sh ir m ing f u q i sh ir . _|0 4 4 5 5 0 1 1 4 4 2 2 4 4 2 2 2 2 0 0|1 2 2 1 2 2 2 2 2 2 1 1
0001_000666|0001_Angry|ZH|每次你看到一些时尚衣物时,|_ m ei c i0 n i k an d ao y i x ie sh ir sh ang y i w u sh ir , _|0 3 3 4 4 3 3 4 4 4 4 4 4 1 1 2 2 4 4 1 1 4 4 2 2 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000672|0001_Angry|ZH|等待你的指令,随时可为你效劳.|_ d eng d ai n i d e zh ir l ing , s ui sh ir k e w ei n i x iao l ao . _|0 3 3 4 4 3 3 5 5 3 3 4 4 0 2 2 2 2 3 3 4 4 3 3 4 4 2 2 0 0|1 2 2 2 2 2 2 1 2 2 2 2 2 2 2 1 1
0001_000673|0001_Angry|ZH|他对谁都那么友好.|_ t a d ui sh ui d ou n a m e y ou h ao . _|0 1 1 4 4 2 2 1 1 4 4 5 5 2 2 3 3 0 0|1 2 2 2 2 2 2 2 2 1 1
0001_000667|0001_Angry|ZH|你看上去比以前更漂亮了.|_ n i k an sh ang q v b i y i q ian g eng p iao l iang l e . _|0 3 3 4 4 4 4 5 5 2 2 3 3 2 2 4 4 4 4 5 5 5 5 0 0|1 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000698|0001_Angry|ZH|我喜欢你的黑衣服,你的尖牙真酷.|_ w o x i h uan n i d e h ei y i f u , n i d e j ian y a zh en k u . _|0 2 2 3 3 5 5 3 3 5 5 1 1 1 1 5 5 0 3 3 5 5 1 1 2 2 1 1 4 4 0 0|1 2 2 2 2 2 2 2 2 1 2 2 2 2 2 2 1 1
0001_000459|0001_Angry|ZH|太棒了,我其实挺饿的.|_ t ai b ang l e , w o q i sh ir t ing EE e d e . _|0 4 4 4 4 5 5 0 3 3 2 2 2 2 3 3 4 4 5 5 0 0|1 2 2 2 1 2 2 2 2 2 2 1 1
0001_000471|0001_Angry|ZH|那你就离市区很远了.|_ n a n i j iu l i sh ir q v h en y van l e . _|0 4 4 3 3 4 4 2 2 4 4 1 1 2 2 3 3 5 5 0 0|1 2 2 2 2 2 2 2 2 2 1 1
0001_000465|0001_Angry|ZH|真是个好习惯,通常看书或消遣.|_ zh en sh ir g e h ao x i g uan , t ong ch ang k an sh u h uo x iao q ian . _|0 1 1 4 4 5 5 3 3 2 2 4 4 0 1 1 2 2 4 4 1 1 4 4 1 1 3 3 0 0|1 2 2 2 2 2 2 1 2 2 2 2 2 2 2 1 1
0001_000539|0001_Angry|ZH|我是一名教师,你可是好眼光.|_ w o sh ir y i m ing j iao sh ir , n i k e sh ir h ao y En g uang . _|0 3 3 4 4 4 4 2 2 4 4 1 1 0 2 2 3 3 4 4 2 2 3 3 1 1 0 0|1 2 2 2 2 2 2 1 2 2 2 2 2 2 1 1
0001_000505|0001_Angry|ZH|我只打算放松一下自己.|_ w o zh ir d a s uan f ang s ong y i x ia z i0 j i . _|0 2 2 3 3 3 3 5 5 4 4 1 1 2 2 4 4 4 4 3 3 0 0|1 2 2 2 2 2 2 2 2 2 2 1 1
0001_000511|0001_Angry|ZH|他讲的笑话让我笑个不停.|_ t a j iang d e x iao h ua r ang w o x iao g e b u t ing . _|0 1 1 3 3 5 5 4 4 5 5 4 4 3 3 4 4 5 5 4 4 2 2 0 0|1 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000507|0001_Angry|ZH|你知道,有时候病人会不讲理.|_ n i zh ir d ao , y ou sh ir h ou b ing r en h ui b u j iang l i . _|0 3 3 1 1 4 4 0 3 3 2 2 5 5 4 4 2 2 4 4 4 4 2 2 3 3 0 0|1 2 2 2 1 2 2 2 2 2 2 2 2 2 1 1
0001_000513|0001_Angry|ZH|我还不知道你认识弗兰克.|_ w o h ai b u zh ir d ao n i r en sh ir f u l an k e . _|0 3 3 2 2 4 4 1 1 4 4 3 3 4 4 5 5 2 2 2 2 4 4 0 0|1 2 2 2 2 2 2 2 2 2 2 2 1 1

241
filelists/train.list Normal file
View File

@@ -0,0 +1,241 @@
0001_000432|0001_Angry|ZH|听说你要去香港看你叔叔.|_ t ing sh uo n i y ao q v x iang g ang k an n i sh u sh u . _|0 1 1 1 1 3 3 4 4 4 4 1 1 3 3 4 4 3 3 1 1 5 5 0 0|1 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000557|0001_Angry|ZH|我是萌萌哒,你是呆呆哒.|_ w o sh ir m eng m eng d a , n i sh ir d ai d ai d a . _|0 3 3 4 4 2 2 2 2 5 5 0 3 3 4 4 1 1 1 1 5 5 0 0|1 2 2 2 2 2 1 2 2 2 2 2 1 1
0001_000621|0001_Angry|ZH|很大,令人兴奋但是嘈杂.|_ h en d a , l ing r en x ing f en d an sh ir c ao z a . _|0 3 3 4 4 0 4 4 2 2 1 1 4 4 4 4 4 4 2 2 2 2 0 0|1 2 2 1 2 2 2 2 2 2 2 2 1 1
0001_000420|0001_Angry|ZH|心动不如行动,我不太擅长卖萌.|_ x in d ong b u r u x ing d ong , w o b u t ai sh an ch ang m ai m eng . _|0 1 1 4 4 4 4 2 2 2 2 4 4 0 3 3 2 2 4 4 4 4 2 2 4 4 2 2 0 0|1 2 2 2 2 2 2 1 2 2 2 2 2 2 2 1 1
0001_000569|0001_Angry|ZH|大部分都是用诱饵钓到的.|_ d a b u f en d ou sh ir y ong y ou EE er d iao d ao d e . _|0 4 4 4 4 5 5 1 1 4 4 4 4 4 4 3 3 4 4 4 4 5 5 0 0|1 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000556|0001_Angry|ZH|是的,我知道,患难见真情.|_ sh ir d e , w o zh ir d ao , h uan n an j ian zh en q ing . _|0 4 4 5 5 0 3 3 1 1 4 4 0 4 4 4 4 4 4 1 1 2 2 0 0|1 2 2 1 2 2 2 1 2 2 2 2 2 1 1
0001_000486|0001_Angry|ZH|我喜欢几乎所有的运动,|_ w o x i h uan j i h u s uo y ou d e y vn d ong , _|0 2 2 3 3 5 5 1 1 1 1 2 2 3 3 5 5 4 4 4 4 0 0|1 2 2 2 2 2 2 2 2 2 2 1 1
0001_000656|0001_Angry|ZH|我在一个机械化农场做工程师.|_ w o z ai y i g e j i x ie h ua n ong ch ang z uo g ong ch eng sh ir . _|0 3 3 4 4 2 2 5 5 1 1 4 4 4 4 2 2 3 3 4 4 1 1 2 2 1 1 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000430|0001_Angry|ZH|看呀,我们差不多就装饰好了.|_ k an y a , w o m en ch a b u d uo j iu zh uang sh ir h ao l e . _|0 4 4 5 5 0 3 3 5 5 4 4 5 5 1 1 4 4 1 1 4 4 3 3 5 5 0 0|1 2 2 1 2 2 2 2 2 2 2 2 2 2 1 1
0001_000520|0001_Angry|ZH|这样你就有时间挥拍打球了.|_ zh e y ang n i j iu y ou sh ir j ian h ui p ai d a q iu l e . _|0 4 4 4 4 3 3 4 4 3 3 2 2 1 1 1 1 1 1 3 3 2 2 5 5 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000668|0001_Angry|ZH|下午好,蒂娜,我想我问错人了.|_ x ia w u h ao , d i n a , w o x iang w o w en c uo r en l e . _|0 4 4 3 3 3 3 0 4 4 4 4 0 3 3 2 2 3 3 4 4 4 4 2 2 5 5 0 0|1 2 2 2 1 2 2 1 2 2 2 2 2 2 2 1 1
0001_000624|0001_Angry|ZH|只要不违法,我还是想留下它.|_ zh ir y ao b u w ei f a , w o h ai sh ir x iang l iu x ia t a . _|0 3 3 4 4 4 4 2 2 3 3 0 3 3 2 2 4 4 3 3 2 2 4 4 1 1 0 0|1 2 2 2 2 2 1 2 2 2 2 2 2 2 1 1
0001_000642|0001_Angry|ZH|哪天我也许得和他谈谈.|_ n a t ian w o y E x v d e h e t a t an t an . _|0 3 3 1 1 3 3 2 2 3 3 5 5 2 2 1 1 2 2 5 5 0 0|1 2 2 2 2 2 2 2 2 2 2 1 1
0001_000360|0001_Angry|ZH|个人收藏家!他们肯定有,|_ g e r en sh ou c ang j ia ! t a m en k en d ing y ou , _|0 4 4 2 2 1 1 2 2 1 1 0 1 1 5 5 3 3 4 4 3 3 0 0|1 2 2 2 2 2 1 2 2 2 2 2 1 1
0001_000515|0001_Angry|ZH|其实我们前天已经分手了.|_ q i sh ir w o m en q ian t ian y i j ing f en sh ou l e . _|0 2 2 2 2 3 3 5 5 2 2 1 1 3 3 1 1 1 1 3 3 5 5 0 0|1 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000511|0001_Angry|ZH|他讲的笑话让我笑个不停.|_ t a j iang d e x iao h ua r ang w o x iao g e b u t ing . _|0 1 1 3 3 5 5 4 4 5 5 4 4 3 3 4 4 5 5 4 4 2 2 0 0|1 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000523|0001_Angry|ZH|一套古瓷器.它真的很珍贵.|_ y i t ao g u c i0 q i . t a zh en d e h en zh en g ui . _|0 2 2 4 4 3 3 2 2 4 4 0 1 1 1 1 5 5 3 3 1 1 4 4 0 0|1 2 2 2 2 2 1 2 2 2 2 2 2 1 1
0001_000633|0001_Angry|ZH|我想所有中国人都会打乒乓球.|_ w o x iang s uo y ou zh ong g uo r en d ou h ui d a p ing p ang q iu . _|0 2 2 3 3 2 2 3 3 1 1 2 2 2 2 1 1 4 4 3 3 1 1 1 1 2 2 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000666|0001_Angry|ZH|每次你看到一些时尚衣物时,|_ m ei c i0 n i k an d ao y i x ie sh ir sh ang y i w u sh ir , _|0 3 3 4 4 3 3 4 4 4 4 4 4 1 1 2 2 4 4 1 1 4 4 2 2 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000650|0001_Angry|ZH|这个我相信,我是登山爱好者.|_ zh e g e w o x iang x in , w o sh ir d eng sh an AA ai h ao zh e . _|0 4 4 5 5 3 3 1 1 4 4 0 3 3 4 4 1 1 1 1 4 4 4 4 3 3 0 0|1 2 2 2 2 2 1 2 2 2 2 2 2 2 1 1
0001_000580|0001_Angry|ZH|那不打扰你了,我不敢约出去.|_ n a b u d a r ao n i l e , w o b u g an y ve ch u q v . _|0 4 4 4 4 2 2 3 3 3 3 5 5 0 3 3 4 4 3 3 1 1 1 1 5 5 0 0|1 2 2 2 2 2 2 1 2 2 2 2 2 2 1 1
0001_000543|0001_Angry|ZH|带女友出去好好吃上一顿.|_ d ai n v y ou ch u q v h ao h ao ch ir sh ang y i d un . _|0 4 4 2 2 3 3 1 1 5 5 3 3 5 5 1 1 4 4 2 2 4 4 0 0|1 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000662|0001_Angry|ZH|如果她拒绝我,我会死的.|_ r u g uo t a j v j ve w o , w o h ui s i0 d e . _|0 2 2 3 3 1 1 4 4 2 2 3 3 0 3 3 4 4 3 3 5 5 0 0|1 2 2 2 2 2 2 1 2 2 2 2 1 1
0001_000536|0001_Angry|ZH|软妹子生气会说,讨厌,不理你啦.|_ r uan m ei z i0 sh eng q i h ui sh uo , t ao y En , b u l i n i l a . _|0 3 3 4 4 5 5 1 1 4 4 4 4 1 1 0 3 3 4 4 0 4 4 3 3 3 3 5 5 0 0|1 2 2 2 2 2 2 2 1 2 2 1 2 2 2 2 1 1
0001_000451|0001_Angry|ZH|很快,车就可自动开了.|_ h en k uai , ch e j iu k e z i0 d ong k ai l e . _|0 3 3 4 4 0 1 1 4 4 3 3 4 4 4 4 1 1 5 5 0 0|1 2 2 1 2 2 2 2 2 2 2 1 1
0001_000476|0001_Angry|ZH|不是,他住在沃斯盾的老房子里.|_ b u sh ir , t a zh u z ai w o s i0 d un d e l ao f ang z i0 l i . _|0 2 2 4 4 0 1 1 4 4 4 4 4 4 1 1 4 4 5 5 3 3 2 2 5 5 3 3 0 0|1 2 2 1 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000544|0001_Angry|ZH|炖肉一小时,剩余三十分钟十八秒.|_ d un r ou y i x iao sh ir , sh eng y v s an sh ir f en zh ong sh ir b a m iao . _|0 4 4 4 4 4 4 3 3 2 2 0 4 4 2 2 1 1 2 2 1 1 1 1 2 2 1 1 3 3 0 0|1 2 2 2 2 2 1 2 2 2 2 2 2 2 2 2 1 1
0001_000585|0001_Angry|ZH|我爱运动,但是对篮球玩得不多.|_ w o AA ai y vn d ong , d an sh ir d ui l an q iu w an d e b u d uo . _|0 3 3 4 4 4 4 4 4 0 4 4 4 4 4 4 2 2 2 2 2 2 5 5 4 4 1 1 0 0|1 2 2 2 2 1 2 2 2 2 2 2 2 2 2 1 1
0001_000630|0001_Angry|ZH|绝对不可以走到湖的中央.|_ j ve d ui b u k e y i z ou d ao h u d e zh ong y ang . _|0 2 2 4 4 4 4 2 2 3 3 3 3 4 4 2 2 5 5 1 1 1 1 0 0|1 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000521|0001_Angry|ZH|你这个小气鬼,很不幸,非常少.|_ n i zh e g e x iao q i g ui , h en b u x ing , f ei ch ang sh ao . _|0 3 3 4 4 5 5 3 3 5 5 3 3 0 3 3 2 2 4 4 0 1 1 2 2 3 3 0 0|1 2 2 2 2 2 2 1 2 2 2 1 2 2 2 1 1
0001_000427|0001_Angry|ZH|奏婚礼进行曲了,他们过来了.|_ z ou h un l i j in x ing q v l e , t a m en g uo l ai l e . _|0 4 4 1 1 3 3 4 4 2 2 1 1 5 5 0 1 1 5 5 4 4 5 5 5 5 0 0|1 2 2 2 2 2 2 2 1 2 2 2 2 2 1 1
0001_000522|0001_Angry|ZH|我是个学生,服务器响应超时.|_ w o sh ir g e x ve sh eng , f u w u q i x iang y ing ch ao sh ir . _|0 3 3 4 4 5 5 2 2 5 5 0 2 2 4 4 4 4 3 3 4 4 1 1 2 2 0 0|1 2 2 2 2 2 1 2 2 2 2 2 2 2 1 1
0001_000595|0001_Angry|ZH|贾尼斯突然兴奋地大叫起来.|_ j ia n i s i0 t u r an x ing f en d i d a j iao q i l ai . _|0 3 3 2 2 1 1 1 1 2 2 1 1 4 4 5 5 4 4 4 4 3 3 5 5 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000478|0001_Angry|ZH|这些颜色也不太适合你.|_ zh e x ie y En s e y E b u t ai sh ir h e n i . _|0 4 4 1 1 2 2 4 4 3 3 2 2 4 4 4 4 2 2 3 3 0 0|1 2 2 2 2 2 2 2 2 2 2 1 1
0001_000468|0001_Angry|ZH|你的同学把你给捉弄了吧.|_ n i d e t ong x ve b a n i g ei zh uo n ong l e b a . _|0 3 3 5 5 2 2 2 2 3 3 2 2 3 3 1 1 4 4 5 5 5 5 0 0|1 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000541|0001_Angry|ZH|别问了!说多了都是眼泪!|_ b ie w en l e ! sh uo d uo l e d ou sh ir y En l ei ! _|0 2 2 4 4 5 5 0 1 1 1 1 5 5 1 1 4 4 3 3 4 4 0 0|1 2 2 2 1 2 2 2 2 2 2 2 1 1
0001_000641|0001_Angry|ZH|在法国南部,气候常年舒适宜人.|_ z ai f a g uo n an b u , q i h ou ch ang n ian sh u sh ir y i r en . _|0 4 4 3 3 2 2 2 2 4 4 0 4 4 4 4 2 2 2 2 1 1 4 4 2 2 2 2 0 0|1 2 2 2 2 2 1 2 2 2 2 2 2 2 2 1 1
0001_000465|0001_Angry|ZH|真是个好习惯,通常看书或消遣.|_ zh en sh ir g e h ao x i g uan , t ong ch ang k an sh u h uo x iao q ian . _|0 1 1 4 4 5 5 3 3 2 2 4 4 0 1 1 2 2 4 4 1 1 4 4 1 1 3 3 0 0|1 2 2 2 2 2 2 1 2 2 2 2 2 2 2 1 1
0001_000619|0001_Angry|ZH|是很棒的一款手机,性价比超级高.|_ sh ir h en b ang d e y i k uan sh ou j i , x ing j ia b i ch ao j i g ao . _|0 4 4 3 3 4 4 5 5 4 4 3 3 3 3 1 1 0 4 4 4 4 3 3 1 1 2 2 1 1 0 0|1 2 2 2 2 2 2 2 2 1 2 2 2 2 2 2 1 1
0001_000357|0001_Angry|ZH|我每个月打一次电话.|_ w o m ei g e y ve d a y i c i0 d ian h ua . _|0 2 2 3 3 5 5 4 4 3 3 2 2 4 4 4 4 4 4 0 0|1 2 2 2 2 2 2 2 2 2 1 1
0001_000514|0001_Angry|ZH|我曾在一家船运公司里面做过六年.|_ w o c eng z ai y i j ia ch uan y vn g ong s i0 l i m ian z uo g uo l iu n ian . _|0 3 3 2 2 4 4 4 4 1 1 2 2 4 4 1 1 1 1 3 3 4 4 4 4 5 5 4 4 2 2 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000683|0001_Angry|ZH|错过这村可就没这个店了.|_ c uo g uo zh e c un k e j iu m ei zh e g e d ian l e . _|0 4 4 4 4 4 4 1 1 3 3 4 4 2 2 4 4 5 5 4 4 5 5 0 0|1 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000547|0001_Angry|ZH|为什么不,交朋友不分性别.|_ w ei sh en m e b u , j iao p eng y ou b u f en x ing b ie . _|0 4 4 2 2 5 5 4 4 0 1 1 2 2 5 5 4 4 1 1 4 4 2 2 0 0|1 2 2 2 2 1 2 2 2 2 2 2 2 1 1
0001_000673|0001_Angry|ZH|他对谁都那么友好.|_ t a d ui sh ui d ou n a m e y ou h ao . _|0 1 1 4 4 2 2 1 1 4 4 5 5 2 2 3 3 0 0|1 2 2 2 2 2 2 2 2 1 1
0001_000525|0001_Angry|ZH|她此刻失业了,你最好不要惹她.|_ t a c i0 k e sh ir y E l e , n i z ui h ao b u y ao r e t a . _|0 1 1 3 3 4 4 1 1 4 4 5 5 0 3 3 4 4 3 3 2 2 4 4 3 3 1 1 0 0|1 2 2 2 2 2 2 1 2 2 2 2 2 2 2 1 1
0001_000596|0001_Angry|ZH|领带对男人来说真必不可少.|_ l ing d ai d ui n an r en l ai sh uo zh en b i b u k e sh ao . _|0 3 3 4 4 4 4 2 2 2 2 2 2 1 1 1 1 4 4 4 4 2 2 3 3 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000409|0001_Angry|ZH|只要是我能玩好的,我都喜欢.|_ zh ir y ao sh ir w o n eng w an h ao d e , w o d ou x i h uan . _|0 3 3 4 4 4 4 3 3 2 2 2 2 3 3 5 5 0 3 3 1 1 3 3 5 5 0 0|1 2 2 2 2 2 2 2 2 1 2 2 2 2 1 1
0001_000590|0001_Angry|ZH|大约一个小时左右.|_ d a y ve y i g e x iao sh ir z uo y ou . _|0 4 4 1 1 2 2 5 5 3 3 2 2 3 3 4 4 0 0|1 2 2 2 2 2 2 2 2 1 1
0001_000686|0001_Angry|ZH|谢谢你的夸奖,鲍伯上年纪了.|_ x ie x ie n i d e k ua j iang , b ao b o sh ang n ian j i l e . _|0 4 4 5 5 3 3 5 5 1 1 3 3 0 4 4 2 2 4 4 2 2 4 4 5 5 0 0|1 2 2 2 2 2 2 1 2 2 2 2 2 2 1 1
0001_000369|0001_Angry|ZH|不就是你嘛,为什么要偷笑来.|_ b u j iu sh ir n i m a , w ei sh en m e y ao t ou x iao l ai . _|0 2 2 4 4 4 4 3 3 5 5 0 4 4 2 2 5 5 4 4 1 1 4 4 2 2 0 0|1 2 2 2 2 2 1 2 2 2 2 2 2 2 1 1
0001_000682|0001_Angry|ZH|我想要那种新款的美国兵款式.|_ w o x iang y ao n a zh ong x in k uan d e m ei g uo b ing k uan sh ir . _|0 2 2 3 3 4 4 4 4 3 3 1 1 3 3 5 5 3 3 2 2 1 1 3 3 4 4 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000516|0001_Angry|ZH|我想那些应该是草莓的种子.|_ w o x iang n a x ie y ing g ai sh ir c ao m ei d e zh ong z i0 . _|0 2 2 3 3 4 4 1 1 1 1 1 1 4 4 3 3 2 2 5 5 3 3 5 5 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000540|0001_Angry|ZH|上海现在是下午四点三十六分.|_ sh ang h ai x ian z ai sh ir x ia w u s i0 d ian s an sh ir l iu f en . _|0 4 4 3 3 4 4 4 4 4 4 4 4 3 3 4 4 3 3 1 1 2 2 4 4 1 1 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000661|0001_Angry|ZH|我们休息一下喝杯咖啡.|_ w o m en x iu x i y i x ia h e b ei k a f ei . _|0 3 3 5 5 1 1 5 5 2 2 4 4 1 1 1 1 1 1 1 1 0 0|1 2 2 2 2 2 2 2 2 2 2 1 1
0001_000578|0001_Angry|ZH|好的.新的音乐厅有一场音乐会.|_ h ao d e . x in d e y in y ve t ing y ou y i ch ang y in y ve h ui . _|0 3 3 5 5 0 1 1 5 5 1 1 4 4 1 1 3 3 4 4 3 3 1 1 4 4 4 4 0 0|1 2 2 1 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000418|0001_Angry|ZH|我应该给女朋友买玫瑰花的.|_ w o y ing g ai g ei n v p eng y ou m ai m ei g ui h ua d e . _|0 3 3 1 1 1 1 3 3 3 3 2 2 5 5 3 3 2 2 5 5 1 1 5 5 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000492|0001_Angry|ZH|是啊,我还是个乳臭未干的小记者.|_ sh ir AA a , w o h ai sh ir g e r u x iu w ei g an d e x iao j i zh e . _|0 4 4 5 5 0 3 3 2 2 4 4 5 5 3 3 4 4 4 4 1 1 5 5 3 3 4 4 3 3 0 0|1 2 2 1 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000433|0001_Angry|ZH|你身上的每一点都吸引着我.|_ n i sh en sh ang d e m ei y i d ian d ou x i y in zh e w o . _|0 3 3 1 1 5 5 5 5 3 3 4 4 3 3 1 1 1 1 3 3 5 5 3 3 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000471|0001_Angry|ZH|那你就离市区很远了.|_ n a n i j iu l i sh ir q v h en y van l e . _|0 4 4 3 3 4 4 2 2 4 4 1 1 2 2 3 3 5 5 0 0|1 2 2 2 2 2 2 2 2 2 1 1
0001_000441|0001_Angry|ZH|如果有我能帮忙的请告诉我.|_ r u g uo y ou w o n eng b ang m ang d e q ing g ao s u w o . _|0 2 2 3 3 2 2 3 3 2 2 1 1 2 2 5 5 3 3 4 4 5 5 3 3 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000550|0001_Angry|ZH|我已经习惯这种气候了.|_ w o y i j ing x i g uan zh e zh ong q i h ou l e . _|0 2 2 3 3 1 1 2 2 4 4 4 4 3 3 4 4 4 4 5 5 0 0|1 2 2 2 2 2 2 2 2 2 2 1 1
0001_000496|0001_Angry|ZH|现在,我仍然有点紧张.|_ x ian z ai , w o r eng r an y ou d ian j in zh ang . _|0 4 4 4 4 0 3 3 2 2 2 2 2 2 3 3 3 3 1 1 0 0|1 2 2 1 2 2 2 2 2 2 2 1 1
0001_000462|0001_Angry|ZH|那棒极了,其实心情挺不错.|_ n a b ang j i l e , q i sh ir x in q ing t ing b u c uo . _|0 4 4 4 4 2 2 5 5 0 2 2 2 2 1 1 2 2 3 3 5 5 4 4 0 0|1 2 2 2 2 1 2 2 2 2 2 2 2 1 1
0001_000618|0001_Angry|ZH|谁都有烦的时候.|_ sh ui d ou y ou f an d e sh ir h ou . _|0 2 2 1 1 3 3 2 2 5 5 2 2 5 5 0 0|1 2 2 2 2 2 2 2 1 1
0001_000623|0001_Angry|ZH|但梅花往往被很多人忽视.|_ d an m ei h ua w ang w ang b ei h en d uo r en h u sh ir . _|0 4 4 2 2 1 1 2 2 3 3 4 4 3 3 1 1 2 2 1 1 4 4 0 0|1 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000449|0001_Angry|ZH|得了吧,别这么胆小啦.|_ d e l e b a , b ie zh e m e d an x iao l a . _|0 2 2 5 5 5 5 0 2 2 4 4 5 5 2 2 3 3 5 5 0 0|1 2 2 2 1 2 2 2 2 2 2 1 1
0001_000423|0001_Angry|ZH|她总是带香甜甜的微笑.|_ t a z ong sh ir d ai x iang t ian t ian d e w ei x iao . _|0 1 1 3 3 4 4 4 4 1 1 2 2 2 2 5 5 1 1 4 4 0 0|1 2 2 2 2 2 2 2 2 2 2 1 1
0001_000367|0001_Angry|ZH|很快你上大学就用得到了.|_ h en k uai n i sh ang d a x ve j iu y ong d e d ao l e . _|0 3 3 4 4 3 3 4 4 4 4 2 2 4 4 4 4 2 2 4 4 5 5 0 0|1 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000652|0001_Angry|ZH|我希望你能和我一起想派对点子.|_ w o x i w ang n i n eng h e w o y i q i x iang p ai d ui d ian z i0 . _|0 3 3 1 1 4 4 3 3 2 2 2 2 3 3 4 4 3 3 3 3 4 4 4 4 3 3 5 5 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000655|0001_Angry|ZH|我支持你.它是需要重做.|_ w o zh ir ch ir n i . t a sh ir x v y ao zh ong z uo . _|0 3 3 1 1 2 2 3 3 0 1 1 4 4 1 1 4 4 4 4 4 4 0 0|1 2 2 2 2 1 2 2 2 2 2 2 1 1
0001_000517|0001_Angry|ZH|太妙了,我想换一些日元.|_ t ai m iao l e , w o x iang h uan y i x ie r ir y van . _|0 4 4 4 4 5 5 0 2 2 3 3 4 4 4 4 1 1 4 4 2 2 0 0|1 2 2 2 1 2 2 2 2 2 2 2 1 1
0001_000463|0001_Angry|ZH|玛丽,你看来很喜欢挖苦我.|_ m a l i , n i k an l ai h en x i h uan w a k u w o . _|0 3 3 4 4 0 3 3 4 4 2 2 2 2 3 3 5 5 1 1 5 5 3 3 0 0|1 2 2 1 2 2 2 2 2 2 2 2 2 1 1
0001_000368|0001_Angry|ZH|我们意见不和,咱们去那儿玩吧.|_ w o m en y i j ian b u h e , z an m en q v n a EE er w an b a . _|0 3 3 5 5 4 4 4 4 4 4 2 2 0 2 2 5 5 4 4 4 4 2 2 2 2 5 5 0 0|1 2 2 2 2 2 2 1 2 2 2 2 2 2 2 1 1
0001_000657|0001_Angry|ZH|有时内在美更加重要.|_ y ou sh ir n ei z ai m ei g eng j ia zh ong y ao . _|0 3 3 2 2 4 4 4 4 3 3 4 4 1 1 4 4 4 4 0 0|1 2 2 2 2 2 2 2 2 2 1 1
0001_000454|0001_Angry|ZH|没有找到蒸鱼的计时.|_ m ei y ou zh ao d ao zh eng y v d e j i sh ir . _|0 2 2 3 3 3 3 4 4 1 1 2 2 5 5 4 4 2 2 0 0|1 2 2 2 2 2 2 2 2 2 1 1
0001_000679|0001_Angry|ZH|但是有时夏天比其它季节更迷人.|_ d an sh ir y ou sh ir x ia t ian b i q i t a j i j ie g eng m i r en . _|0 4 4 4 4 3 3 2 2 4 4 1 1 3 3 2 2 1 1 4 4 2 2 4 4 2 2 2 2 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000456|0001_Angry|ZH|做不了什么,通常我会保持沉默.|_ z uo b u l iao sh en m e , t ong ch ang w o h ui b ao ch ir ch en m o . _|0 4 4 5 5 3 3 2 2 5 5 0 1 1 2 2 3 3 4 4 3 3 2 2 2 2 4 4 0 0|1 2 2 2 2 2 1 2 2 2 2 2 2 2 2 1 1
0001_000353|0001_Angry|ZH|我老家在北京,哇塞!太精彩了.|_ w o l ao j ia z ai b ei j ing , w a s ai ! t ai j ing c ai l e . _|0 2 2 3 3 1 1 4 4 3 3 1 1 0 1 1 1 1 0 4 4 1 1 3 3 5 5 0 0|1 2 2 2 2 2 2 1 2 2 1 2 2 2 2 1 1
0001_000470|0001_Angry|ZH|你还真是考虑周到.|_ n i h ai zh en sh ir k ao l v zh ou d ao . _|0 3 3 2 2 1 1 4 4 3 3 4 4 1 1 4 4 0 0|1 2 2 2 2 2 2 2 2 1 1
0001_000542|0001_Angry|ZH|如果我滚远了就回不来了.|_ r u g uo w o g un y van l e j iu h ui b u l ai l e . _|0 2 2 3 3 3 3 2 2 3 3 5 5 4 4 2 2 5 5 2 2 5 5 0 0|1 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000592|0001_Angry|ZH|为了不让鱼吃掉诗人的身体.|_ w ei l e b u r ang y v ch ir d iao sh ir r en d e sh en t i . _|0 4 4 5 5 2 2 4 4 2 2 1 1 4 4 1 1 2 2 5 5 1 1 3 3 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000457|0001_Angry|ZH|我的表两点四十二.可是它有点快.|_ w o d e b iao l iang d ian s i0 sh ir EE er . k e sh ir t a y ou d ian k uai . _|0 3 3 5 5 3 3 2 2 3 3 4 4 2 2 4 4 0 3 3 4 4 1 1 2 2 3 3 4 4 0 0|1 2 2 2 2 2 2 2 2 1 2 2 2 2 2 2 1 1
0001_000464|0001_Angry|ZH|我也是,我还有点儿口渴.|_ w o y E sh ir , w o h ai y ou d ian EE er k ou k e . _|0 2 2 3 3 4 4 0 3 3 2 2 2 2 3 3 2 2 2 2 3 3 0 0|1 2 2 2 1 2 2 2 2 2 2 2 1 1
0001_000693|0001_Angry|ZH|许多白领都参加到这个游戏里面,|_ x v d uo b ai l ing d ou c an j ia d ao zh e g e y ou x i l i m ian , _|0 3 3 1 1 2 2 3 3 1 1 1 1 1 1 4 4 4 4 5 5 2 2 4 4 3 3 4 4 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000609|0001_Angry|ZH|我们想等一个合适的时候.|_ w o m en x iang d eng y i g e h e sh ir d e sh ir h ou . _|0 3 3 5 5 2 2 3 3 2 2 5 5 2 2 4 4 5 5 2 2 5 5 0 0|1 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000653|0001_Angry|ZH|我一直到清晨四点才到家,|_ w o y i zh ir d ao q ing ch en s i0 d ian c ai d ao j ia , _|0 3 3 4 4 2 2 4 4 1 1 2 2 4 4 3 3 2 2 4 4 1 1 0 0|1 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000685|0001_Angry|ZH|他们将于今年夏天结婚.|_ t a m en j iang y v j in n ian x ia t ian j ie h un . _|0 1 1 5 5 1 1 2 2 1 1 2 2 4 4 1 1 2 2 1 1 0 0|1 2 2 2 2 2 2 2 2 2 2 1 1
0001_000518|0001_Angry|ZH|你得先回答我,你最喜欢谁.|_ n i d e x ian h ui d a w o , n i z ui x i h uan sh ui . _|0 3 3 5 5 1 1 2 2 2 2 3 3 0 3 3 4 4 3 3 5 5 2 2 0 0|1 2 2 2 2 2 2 1 2 2 2 2 2 1 1
0001_000355|0001_Angry|ZH|我们乘船漂游了三峡,真是刺激.|_ w o m en ch eng ch uan p iao y ou l e s an x ia , zh en sh ir c i0 j i . _|0 3 3 5 5 2 2 2 2 1 1 2 2 5 5 1 1 2 2 0 1 1 4 4 4 4 5 5 0 0|1 2 2 2 2 2 2 2 2 2 1 2 2 2 2 1 1
0001_000584|0001_Angry|ZH|它是一个主要的空气污染物.|_ t a sh ir y i g e zh u y ao d e k ong q i w u r an w u . _|0 1 1 4 4 2 2 5 5 3 3 4 4 5 5 1 1 4 4 1 1 3 3 4 4 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000586|0001_Angry|ZH|我不需要嗅觉,所以没有鼻子.|_ w o b u x v y ao x iu j ve , s uo y i m ei y ou b i z i0 . _|0 3 3 4 4 1 1 4 4 4 4 2 2 0 2 2 3 3 2 2 3 3 2 2 5 5 0 0|1 2 2 2 2 2 2 1 2 2 2 2 2 2 1 1
0001_000488|0001_Angry|ZH|我总是控制不了它.|_ w o z ong sh ir k ong zh ir b u l iao t a . _|0 2 2 3 3 4 4 4 4 4 4 4 4 3 3 1 1 0 0|1 2 2 2 2 2 2 2 2 1 1
0001_000352|0001_Angry|ZH|英国的哲学家曾经说过'|_ y ing g uo d e zh e x ve j ia c eng j ing sh uo g uo ' _|0 1 1 2 2 5 5 2 2 2 2 1 1 2 2 1 1 1 1 5 5 0 0|1 2 2 2 2 2 2 2 2 2 2 1 1
0001_000660|0001_Angry|ZH|这局我让你开,今天我不想错过.|_ zh e j v w o r ang n i k ai , j in t ian w o b u x iang c uo g uo . _|0 4 4 2 2 3 3 4 4 3 3 1 1 0 1 1 1 1 3 3 4 4 3 3 4 4 4 4 0 0|1 2 2 2 2 2 2 1 2 2 2 2 2 2 2 1 1
0001_000408|0001_Angry|ZH|让人看上去就感到宽广,气魄非凡.|_ r ang r en k an sh ang q v j iu g an d ao k uan g uang , q i p o f ei f an . _|0 4 4 2 2 4 4 4 4 5 5 4 4 3 3 4 4 1 1 3 3 0 4 4 4 4 1 1 2 2 0 0|1 2 2 2 2 2 2 2 2 2 2 1 2 2 2 2 1 1
0001_000583|0001_Angry|ZH|拜托,别跟我提到笔记本电脑.|_ b ai t uo , b ie g en w o t i d ao b i j i b en d ian n ao . _|0 4 4 1 1 0 2 2 1 1 3 3 2 2 4 4 3 3 4 4 3 3 4 4 3 3 0 0|1 2 2 1 2 2 2 2 2 2 2 2 2 2 1 1
0001_000582|0001_Angry|ZH|我最近正在努力练习棋艺.|_ w o z ui j in zh eng z ai n u l i l ian x i q i y i . _|0 3 3 4 4 4 4 4 4 4 4 3 3 4 4 4 4 2 2 2 2 4 4 0 0|1 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000669|0001_Angry|ZH|家里有全自动洗衣机.|_ j ia l i y ou q van z i0 d ong x i y i j i . _|0 1 1 3 3 3 3 2 2 4 4 4 4 3 3 1 1 1 1 0 0|1 2 2 2 2 2 2 2 2 2 1 1
0001_000359|0001_Angry|ZH|就是这个意思,你又聪明又好看.|_ j iu sh ir zh e g e y i s i0 , n i y ou c ong m ing y ou h ao k an . _|0 4 4 4 4 4 4 5 5 4 4 5 5 0 3 3 4 4 1 1 5 5 4 4 3 3 4 4 0 0|1 2 2 2 2 2 2 1 2 2 2 2 2 2 2 1 1
0001_000644|0001_Angry|ZH|我是银灰色的,我都被你说饿了.|_ w o sh ir y in h ui s e d e , w o d ou b ei n i sh uo EE e l e . _|0 3 3 4 4 2 2 1 1 4 4 5 5 0 3 3 1 1 4 4 3 3 1 1 4 4 5 5 0 0|1 2 2 2 2 2 2 1 2 2 2 2 2 2 2 1 1
0001_000469|0001_Angry|ZH|不过我想星期五走,|_ b u g uo w o x iang x ing q i w u z ou , _|0 2 2 4 4 2 2 3 3 1 1 1 1 3 3 3 3 0 0|1 2 2 2 2 2 2 2 2 1 1
0001_000358|0001_Angry|ZH|沙尘暴好像给每个人都带来了麻烦!|_ sh a ch en b ao h ao x iang g ei m ei g e r en d ou d ai l ai l e m a f an ! _|0 1 1 2 2 4 4 3 3 4 4 2 2 3 3 5 5 2 2 1 1 4 4 2 2 5 5 2 2 5 5 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000370|0001_Angry|ZH|前几天我碰见了一件有趣的事儿.|_ q ian j i t ian w o p eng j ian l e y i j ian y ou q v d e sh ir EE er . _|0 2 2 3 3 1 1 3 3 4 4 4 4 5 5 2 2 4 4 3 3 4 4 5 5 4 4 2 2 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000676|0001_Angry|ZH|这么多笑话,一天讲不完!|_ zh e m e d uo x iao h ua , y i t ian j iang b u w an ! _|0 4 4 5 5 1 1 4 4 5 5 0 4 4 1 1 3 3 4 4 2 2 0 0|1 2 2 2 2 2 1 2 2 2 2 2 1 1
0001_000597|0001_Angry|ZH|没有为什么就是要等我.|_ m ei y ou w ei sh en m e j iu sh ir y ao d eng w o . _|0 2 2 3 3 4 4 2 2 5 5 4 4 4 4 4 4 2 2 3 3 0 0|1 2 2 2 2 2 2 2 2 2 2 1 1
0001_000534|0001_Angry|ZH|二零一六年十一月五号是星期六.|_ EE er l ing y i l iu n ian sh ir y i y ve w u h ao sh ir x ing q i l iu . _|0 4 4 2 2 1 1 4 4 2 2 2 2 2 2 4 4 3 3 4 4 4 4 1 1 1 1 4 4 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000648|0001_Angry|ZH|祝你春节快乐,全家幸福安康.|_ zh u n i ch un j ie k uai l e , q van j ia x ing f u AA an k ang . _|0 4 4 3 3 1 1 2 2 4 4 4 4 0 2 2 1 1 4 4 5 5 1 1 1 1 0 0|1 2 2 2 2 2 2 1 2 2 2 2 2 2 1 1
0001_000537|0001_Angry|ZH|我们一起为他办个惊喜派对.|_ w o m en y i q i w ei t a b an g e j ing x i p ai d ui . _|0 3 3 5 5 4 4 3 3 4 4 1 1 4 4 5 5 1 1 3 3 4 4 4 4 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000510|0001_Angry|ZH|当然!他是我们大学的班长.|_ d ang r an ! t a sh ir w o m en d a x ve d e b an zh ang . _|0 1 1 2 2 0 1 1 4 4 3 3 5 5 4 4 2 2 5 5 1 1 3 3 0 0|1 2 2 1 2 2 2 2 2 2 2 2 2 1 1
0001_000700|0001_Angry|ZH|是很难听的脏话,主人可别学了.|_ sh ir h en n an t ing d e z ang h ua , zh u r en k e b ie x ve l e . _|0 4 4 3 3 2 2 1 1 5 5 1 1 4 4 0 3 3 2 2 3 3 2 2 2 2 5 5 0 0|1 2 2 2 2 2 2 2 1 2 2 2 2 2 2 1 1
0001_000507|0001_Angry|ZH|你知道,有时候病人会不讲理.|_ n i zh ir d ao , y ou sh ir h ou b ing r en h ui b u j iang l i . _|0 3 3 1 1 4 4 0 3 3 2 2 5 5 4 4 2 2 4 4 4 4 2 2 3 3 0 0|1 2 2 2 1 2 2 2 2 2 2 2 2 2 1 1
0001_000477|0001_Angry|ZH|你说我们在芝加哥要待三天的.|_ n i sh uo w o m en z ai zh ir j ia g e y ao d ai s an t ian d e . _|0 3 3 1 1 3 3 5 5 4 4 1 1 1 1 1 1 4 4 4 4 1 1 1 1 5 5 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000535|0001_Angry|ZH|今天真凉快,我希望主队输掉.|_ j in t ian zh en l iang k uai , w o x i w ang zh u d ui sh u d iao . _|0 1 1 1 1 1 1 2 2 5 5 0 3 3 1 1 4 4 3 3 4 4 1 1 4 4 0 0|1 2 2 2 2 2 1 2 2 2 2 2 2 2 1 1
0001_000440|0001_Angry|ZH|还不太糟糕,但是得躺在床上.|_ h ai b u t ai z ao g ao , d an sh ir d e t ang z ai ch uang sh ang . _|0 2 2 2 2 4 4 1 1 1 1 0 4 4 4 4 5 5 3 3 4 4 2 2 4 4 0 0|1 2 2 2 2 2 1 2 2 2 2 2 2 2 1 1
0001_000524|0001_Angry|ZH|他在这次竞选活动中花了数百万,|_ t a z ai zh e c i0 j ing x van h uo d ong zh ong h ua l e sh u b ai w an , _|0 1 1 4 4 4 4 4 4 4 4 3 3 2 2 4 4 1 1 1 1 5 5 4 4 3 3 4 4 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000627|0001_Angry|ZH|是的,所以我永不喝它的.|_ sh ir d e , s uo y i w o y ong b u h e t a d e . _|0 4 4 5 5 0 2 2 2 2 3 3 3 3 4 4 1 1 1 1 5 5 0 0|1 2 2 1 2 2 2 2 2 2 2 2 1 1
0001_000503|0001_Angry|ZH|我们还等什么|_ w o m en h ai d eng sh en m e _|0 3 3 5 5 2 2 3 3 2 2 5 5 0|1 2 2 2 2 2 2 1
0001_000581|0001_Angry|ZH|最近很冷,风又大.|_ z ui j in h en l eng , f eng y ou d a . _|0 4 4 4 4 2 2 3 3 0 1 1 4 4 4 4 0 0|1 2 2 2 2 1 2 2 2 1 1
0001_000365|0001_Angry|ZH|我特别喜欢网球和登山.|_ w o t e b ie x i h uan w ang q iu h e d eng sh an . _|0 3 3 4 4 2 2 3 3 5 5 3 3 2 2 2 2 1 1 1 1 0 0|1 2 2 2 2 2 2 2 2 2 2 1 1
0001_000667|0001_Angry|ZH|你看上去比以前更漂亮了.|_ n i k an sh ang q v b i y i q ian g eng p iao l iang l e . _|0 3 3 4 4 4 4 5 5 2 2 3 3 2 2 4 4 4 4 5 5 5 5 0 0|1 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000421|0001_Angry|ZH|只要令人鼓舞的电影我都喜欢.|_ zh ir y ao l ing r en g u w u d e d ian y ing w o d ou x i h uan . _|0 3 3 4 4 4 4 2 2 2 2 3 3 5 5 4 4 3 3 3 3 1 1 3 3 5 5 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000424|0001_Angry|ZH|今年应该是第二十七个教师节.|_ j in n ian y ing g ai sh ir d i EE er sh ir q i g e j iao sh ir j ie . _|0 1 1 2 2 1 1 1 1 4 4 4 4 4 4 2 2 1 1 5 5 4 4 1 1 2 2 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000646|0001_Angry|ZH|赌博往往是个祸根,|_ d u b o w ang w ang sh ir g e h uo g en , _|0 3 3 2 2 2 2 3 3 4 4 5 5 4 4 1 1 0 0|1 2 2 2 2 2 2 2 2 1 1
0001_000485|0001_Angry|ZH|我要学习一下相关知识.|_ w o y ao x ve x i y i x ia x iang g uan zh ir sh ir . _|0 3 3 4 4 2 2 2 2 2 2 4 4 1 1 1 1 1 1 5 5 0 0|1 2 2 2 2 2 2 2 2 2 2 1 1
0001_000636|0001_Angry|ZH|门儿都没有,现在还不会.|_ m en EE er d ou m ei y ou , x ian z ai h ai b u h ui . _|0 2 2 2 2 1 1 2 2 3 3 0 4 4 4 4 2 2 2 2 4 4 0 0|1 2 2 2 2 2 1 2 2 2 2 2 1 1
0001_000663|0001_Angry|ZH|旅行结束后我将休息一段时间.|_ l v x ing j ie sh u h ou w o j iang x iu x i y i d uan sh ir j ian . _|0 3 3 2 2 2 2 4 4 4 4 3 3 1 1 1 1 5 5 2 2 4 4 2 2 1 1 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000351|0001_Angry|ZH|打远一看,它们的确很是美丽,|_ d a y van y i k an , t a m en d i q ve h en sh ir m ei l i , _|0 2 2 3 3 2 2 4 4 0 1 1 5 5 2 2 4 4 3 3 4 4 3 3 4 4 0 0|1 2 2 2 2 1 2 2 2 2 2 2 2 2 1 1
0001_000680|0001_Angry|ZH|我们相处得很好,仅此而已.|_ w o m en x iang ch u d e h en h ao , j in c i0 EE er y i . _|0 3 3 5 5 1 1 3 3 5 5 2 2 3 3 0 2 2 3 3 2 2 3 3 0 0|1 2 2 2 2 2 2 2 1 2 2 2 2 1 1
0001_000422|0001_Angry|ZH|资料全都不见了.气死我了.|_ z i0 l iao q van d ou b u j ian l e . q i s i0 w o l e . _|0 1 1 4 4 2 2 1 1 2 2 4 4 5 5 0 4 4 3 3 3 3 5 5 0 0|1 2 2 2 2 2 2 2 1 2 2 2 2 1 1
0001_000675|0001_Angry|ZH|尽管提意见,我会改正的.|_ j in g uan t i y i j ian , w o h ui g ai zh eng d e . _|0 2 2 3 3 2 2 4 4 4 4 0 3 3 4 4 3 3 4 4 5 5 0 0|1 2 2 2 2 2 1 2 2 2 2 2 1 1
0001_000446|0001_Angry|ZH|别小看我这发型!我还蛮喜欢的.|_ b ie x iao k an w o zh e f a x ing ! w o h ai m an x i h uan d e . _|0 2 2 3 3 4 4 3 3 4 4 4 4 2 2 0 3 3 2 2 2 2 3 3 5 5 5 5 0 0|1 2 2 2 2 2 2 2 1 2 2 2 2 2 2 1 1
0001_000608|0001_Angry|ZH|这句话的意义我不太明白.|_ zh e j v h ua d e y i y i w o b u t ai m ing b ai . _|0 4 4 4 4 4 4 5 5 4 4 4 4 3 3 2 2 4 4 2 2 5 5 0 0|1 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000447|0001_Angry|ZH|你女儿和她妈妈长得很像.|_ n i n v EE er h e t a m a m a zh ang d e h en x iang . _|0 2 2 3 3 2 2 2 2 1 1 1 1 5 5 3 3 5 5 3 3 4 4 0 0|1 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000527|0001_Angry|ZH|你在我的心里折腾好久了.|_ n i z ai w o d e x in l i zh e t eng h ao j iu l e . _|0 3 3 4 4 3 3 5 5 1 1 5 5 1 1 5 5 2 2 3 3 5 5 0 0|1 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000504|0001_Angry|ZH|我还不会说其他外语,只会普通话.|_ w o h ai b u h ui sh uo q i t a w ai y v , zh ir h ui p u t ong h ua . _|0 3 3 2 2 2 2 4 4 1 1 2 2 1 1 4 4 3 3 0 3 3 4 4 3 3 1 1 4 4 0 0|1 2 2 2 2 2 2 2 2 2 1 2 2 2 2 2 1 1
0001_000692|0001_Angry|ZH|我缺钱用,所以上星期把它当了.|_ w o q ve q ian y ong , s uo y i sh ang x ing q i b a t a d ang l e . _|0 3 3 1 1 2 2 4 4 0 2 2 3 3 4 4 1 1 1 1 3 3 1 1 1 1 5 5 0 0|1 2 2 2 2 1 2 2 2 2 2 2 2 2 2 1 1
0001_000554|0001_Angry|ZH|你昨天才买衣服,真是一购物狂.|_ n i z uo t ian c ai m ai y i f u , zh en sh ir y i g ou w u k uang . _|0 3 3 2 2 1 1 2 2 3 3 1 1 5 5 0 1 1 4 4 2 2 4 4 4 4 2 2 0 0|1 2 2 2 2 2 2 2 1 2 2 2 2 2 2 1 1
0001_000475|0001_Angry|ZH|如果你想要纹身,你去纹好了.|_ r u g uo n i x iang y ao w en sh en , n i q v w en h ao l e . _|0 2 2 3 3 3 3 3 3 4 4 2 2 1 1 0 3 3 4 4 2 2 3 3 5 5 0 0|1 2 2 2 2 2 2 2 1 2 2 2 2 2 1 1
0001_000493|0001_Angry|ZH|女孩的心思你别猜,但是我不用猜.|_ n v h ai d e x in s i0 n i b ie c ai , d an sh ir w o b u y ong c ai . _|0 3 3 2 2 5 5 1 1 5 5 3 3 2 2 1 1 0 4 4 4 4 3 3 2 2 4 4 1 1 0 0|1 2 2 2 2 2 2 2 2 1 2 2 2 2 2 2 1 1
0001_000691|0001_Angry|ZH|我会在你的脸上画鬼脸.|_ w o h ui z ai n i d e l ian sh ang h ua g ui l ian . _|0 3 3 4 4 4 4 3 3 5 5 3 3 5 5 4 4 2 2 3 3 0 0|1 2 2 2 2 2 2 2 2 2 2 1 1
0001_000688|0001_Angry|ZH|年轻人当然要承担责任,|_ n ian q ing r en d ang r an y ao ch eng d an z e r en , _|0 2 2 1 1 2 2 1 1 2 2 4 4 2 2 1 1 2 2 4 4 0 0|1 2 2 2 2 2 2 2 2 2 2 1 1
0001_000587|0001_Angry|ZH|雪下得真大,带着我去购物.|_ x ve x ia d e zh en d a , d ai zh e w o q v g ou w u . _|0 3 3 4 4 5 5 1 1 4 4 0 4 4 5 5 3 3 4 4 4 4 4 4 0 0|1 2 2 2 2 2 1 2 2 2 2 2 2 1 1
0001_000453|0001_Angry|ZH|感觉好温暖呀,好的,一会儿见.|_ g an j ve h ao w en n uan y a , h ao d e , y i h ui EE er j ian . _|0 3 3 2 2 3 3 1 1 3 3 5 5 0 3 3 5 5 0 2 2 4 4 5 5 4 4 0 0|1 2 2 2 2 2 2 1 2 2 1 2 2 2 2 1 1
0001_000568|0001_Angry|ZH|明天是星期天,我们去透透气吧.|_ m ing t ian sh ir x ing q i t ian , w o m en q v t ou t ou q i b a . _|0 2 2 1 1 4 4 1 1 1 1 1 1 0 3 3 5 5 4 4 4 4 5 5 4 4 5 5 0 0|1 2 2 2 2 2 2 1 2 2 2 2 2 2 2 1 1
0001_000699|0001_Angry|ZH|是的,真是名副其实.|_ sh ir d e , zh en sh ir m ing f u q i sh ir . _|0 4 4 5 5 0 1 1 4 4 2 2 4 4 2 2 2 2 0 0|1 2 2 1 2 2 2 2 2 2 1 1
0001_000530|0001_Angry|ZH|冬天雨非常多.我不喜欢雨天.|_ d ong t ian y v f ei ch ang d uo . w o b u x i h uan y v t ian . _|0 1 1 1 1 3 3 1 1 2 2 1 1 0 3 3 4 4 3 3 5 5 3 3 1 1 0 0|1 2 2 2 2 2 2 1 2 2 2 2 2 2 1 1
0001_000490|0001_Angry|ZH|我也知道自己是大嘴巴.|_ w o y E zh ir d ao z i0 j i sh ir d a z ui b a . _|0 2 2 3 3 1 1 4 4 4 4 3 3 4 4 4 4 3 3 5 5 0 0|1 2 2 2 2 2 2 2 2 2 2 1 1
0001_000363|0001_Angry|ZH|周末的我,只忙着陪你.|_ zh ou m o d e w o , zh ir m ang zh e p ei n i . _|0 1 1 4 4 5 5 3 3 0 3 3 2 2 5 5 2 2 3 3 0 0|1 2 2 2 2 1 2 2 2 2 2 1 1
0001_000484|0001_Angry|ZH|多教我些东西我会更聪明.|_ d uo j iao w o x ie d ong x i w o h ui g eng c ong m ing . _|0 1 1 4 4 3 3 1 1 1 1 5 5 3 3 4 4 4 4 1 1 5 5 0 0|1 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000674|0001_Angry|ZH|我喜欢吃中餐.|_ w o x i h uan ch ir zh ong c an . _|0 2 2 3 3 5 5 1 1 1 1 1 1 0 0|1 2 2 2 2 2 2 1 1
0001_000645|0001_Angry|ZH|文学和经济,我喜欢很多著作.|_ w en x ve h e j ing j i , w o x i h uan h en d uo zh u z uo . _|0 2 2 2 2 2 2 1 1 4 4 0 2 2 3 3 5 5 3 3 1 1 4 4 4 4 0 0|1 2 2 2 2 2 1 2 2 2 2 2 2 2 1 1
0001_000526|0001_Angry|ZH|带上你的家人,但是他有丑闻.|_ d ai sh ang n i d e j ia r en , d an sh ir t a y ou ch ou w en . _|0 4 4 4 4 3 3 5 5 1 1 2 2 0 4 4 4 4 1 1 2 2 3 3 2 2 0 0|1 2 2 2 2 2 2 1 2 2 2 2 2 2 1 1
0001_000461|0001_Angry|ZH|每天早晨都是我妈妈帮他系的.|_ m ei t ian z ao ch en d ou sh ir w o m a m a b ang t a x i d e . _|0 3 3 1 1 3 3 2 2 1 1 4 4 3 3 1 1 5 5 1 1 1 1 4 4 5 5 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000634|0001_Angry|ZH|有充足的时间购物和观光.|_ y ou ch ong z u d e sh ir j ian g ou w u h e g uan g uang . _|0 3 3 1 1 2 2 5 5 2 2 1 1 4 4 4 4 2 2 1 1 1 1 0 0|1 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000508|0001_Angry|ZH|我的性格就是冷静并且客观.|_ w o d e x ing g e j iu sh ir l eng j ing b ing q ie k e g uan . _|0 3 3 5 5 4 4 2 2 4 4 4 4 3 3 4 4 4 4 3 3 4 4 1 1 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000555|0001_Angry|ZH|还要叫她起床,怎么会不早起.|_ h ai y ao j iao t a q i ch uang , z en m e h ui b u z ao q i . _|0 2 2 4 4 4 4 1 1 3 3 2 2 0 3 3 5 5 4 4 4 4 2 2 3 3 0 0|1 2 2 2 2 2 2 1 2 2 2 2 2 2 1 1
0001_000435|0001_Angry|ZH|是啊,他的健康我总放心不下.|_ sh ir AA a , t a d e j ian k ang w o z ong f ang x in b u x ia . _|0 4 4 5 5 0 1 1 5 5 4 4 1 1 2 2 3 3 4 4 1 1 2 2 5 5 0 0|1 2 2 1 2 2 2 2 2 2 2 2 2 2 1 1
0001_000431|0001_Angry|ZH|这个镇上所有的人都喜欢扯闲话.|_ zh e g e zh en sh ang s uo y ou d e r en d ou x i h uan ch e x ian h ua . _|0 4 4 5 5 4 4 4 4 2 2 3 3 5 5 2 2 1 1 3 3 5 5 3 3 2 2 4 4 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000479|0001_Angry|ZH|对别人没有,而对我就有.|_ d ui b ie r en m ei y ou , EE er d ui w o j iu y ou . _|0 4 4 2 2 2 2 2 2 3 3 0 2 2 4 4 3 3 4 4 3 3 0 0|1 2 2 2 2 2 1 2 2 2 2 2 1 1
0001_000356|0001_Angry|ZH|我喜欢'北京欢迎你'.|_ w o x i h uan ' b ei j ing h uan y ing n i ' . _|0 2 2 3 3 5 5 0 3 3 1 1 1 1 2 2 3 3 0 0 0|1 2 2 2 1 2 2 2 2 2 1 1 1
0001_000450|0001_Angry|ZH|就经常去我们宿舍附近的酒吧.|_ j iu j ing ch ang q v w o m en s u sh e f u j in d e j iu b a . _|0 4 4 1 1 2 2 4 4 3 3 5 5 4 4 4 4 4 4 4 4 5 5 3 3 5 5 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000551|0001_Angry|ZH|也就是一大堆照片.|_ y E j iu sh ir y i d a d ui zh ao p ian . _|0 3 3 4 4 4 4 2 2 4 4 1 1 4 4 1 1 0 0|1 2 2 2 2 2 2 2 2 1 1
0001_000495|0001_Angry|ZH|听大自然的声响,就像听音乐一样!|_ t ing d a z i0 r an d e sh eng x iang , j iu x iang t ing y in y ve y i y ang ! _|0 1 1 4 4 4 4 2 2 5 5 1 1 3 3 0 4 4 4 4 1 1 1 1 4 4 2 2 4 4 0 0|1 2 2 2 2 2 2 2 1 2 2 2 2 2 2 2 1 1
0001_000593|0001_Angry|ZH|那样的话你应该穿讲究一点.|_ n a y ang d e h ua n i y ing g ai ch uan j iang j iu y i d ian . _|0 4 4 4 4 5 5 4 4 3 3 1 1 1 1 1 1 3 3 5 5 4 4 3 3 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000538|0001_Angry|ZH|以后我要经常来这儿爬山.|_ y i h ou w o y ao j ing ch ang l ai zh e EE er p a sh an . _|0 3 3 4 4 3 3 4 4 1 1 2 2 2 2 4 4 2 2 2 2 1 1 0 0|1 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000681|0001_Angry|ZH|于是我就问她能不能连我的票买了.|_ y v sh ir w o j iu w en t a n eng b u n eng l ian w o d e p iao m ai l e . _|0 2 2 4 4 3 3 4 4 4 4 1 1 2 2 4 4 2 2 2 2 3 3 5 5 4 4 3 3 5 5 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000489|0001_Angry|ZH|他们的配合值得我们学习|_ t a m en d e p ei h e zh ir d e w o m en x ve x i _|0 1 1 5 5 5 5 4 4 2 2 2 2 5 5 3 3 5 5 2 2 2 2 0|1 2 2 2 2 2 2 2 2 2 2 2 1
0001_000501|0001_Angry|ZH|我也最喜欢你,不要开枪.我投降|_ w o y E z ui x i h uan n i , b u y ao k ai q iang . w o t ou x iang _|0 2 2 3 3 4 4 3 3 5 5 3 3 0 2 2 4 4 1 1 1 1 0 3 3 2 2 2 2 0|1 2 2 2 2 2 2 1 2 2 2 2 1 2 2 2 1
0001_000480|0001_Angry|ZH|我的希望是工作到倒下的那一天.|_ w o d e x i w ang sh ir g ong z uo d ao d ao x ia d e n a y i t ian . _|0 3 3 5 5 1 1 4 4 4 4 1 1 4 4 4 4 3 3 4 4 5 5 4 4 4 4 1 1 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000696|0001_Angry|ZH|好好休息一下,这个小木棍叫梯.|_ h ao h ao x iu x i y i x ia , zh e g e x iao m u g un j iao t i . _|0 2 2 3 3 1 1 5 5 2 2 4 4 0 4 4 5 5 3 3 4 4 4 4 4 4 1 1 0 0|1 2 2 2 2 2 2 1 2 2 2 2 2 2 2 1 1
0001_000509|0001_Angry|ZH|我不会牺牲我的健康来换取金钱的.|_ w o b u h ui x i sh eng w o d e j ian k ang l ai h uan q v j in q ian d e . _|0 3 3 2 2 4 4 1 1 1 1 3 3 5 5 4 4 1 1 2 2 4 4 3 3 1 1 2 2 5 5 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000448|0001_Angry|ZH|我只会斗斗地主什么的.|_ w o zh ir h ui d ou d ou d i zh u sh en m e d e . _|0 2 2 3 3 4 4 4 4 4 4 4 4 3 3 2 2 5 5 5 5 0 0|1 2 2 2 2 2 2 2 2 2 2 1 1
0001_000689|0001_Angry|ZH|不要乱问女孩子的年龄.|_ b u y ao l uan w en n v h ai z i0 d e n ian l ing . _|0 2 2 4 4 4 4 4 4 3 3 2 2 5 5 5 5 2 2 2 2 0 0|1 2 2 2 2 2 2 2 2 2 2 1 1
0001_000640|0001_Angry|ZH|还有聊天记录.|_ h ai y ou l iao t ian j i l u . _|0 2 2 3 3 2 2 1 1 4 4 4 4 0 0|1 2 2 2 2 2 2 1 1
0001_000698|0001_Angry|ZH|我喜欢你的黑衣服,你的尖牙真酷.|_ w o x i h uan n i d e h ei y i f u , n i d e j ian y a zh en k u . _|0 2 2 3 3 5 5 3 3 5 5 1 1 1 1 5 5 0 3 3 5 5 1 1 2 2 1 1 4 4 0 0|1 2 2 2 2 2 2 2 2 1 2 2 2 2 2 2 1 1
0001_000632|0001_Angry|ZH|有些人划船,有的人在进行花草活动|_ y ou x ie r en h ua ch uan , y ou d e r en z ai j in x ing h ua c ao h uo d ong _|0 3 3 1 1 2 2 2 2 2 2 0 3 3 5 5 2 2 4 4 4 4 2 2 1 1 3 3 2 2 4 4 0|1 2 2 2 2 2 1 2 2 2 2 2 2 2 2 2 2 1
0001_000513|0001_Angry|ZH|我还不知道你认识弗兰克.|_ w o h ai b u zh ir d ao n i r en sh ir f u l an k e . _|0 3 3 2 2 4 4 1 1 4 4 3 3 4 4 5 5 2 2 2 2 4 4 0 0|1 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000643|0001_Angry|ZH|振作点儿,我看了屏幕显示!|_ zh en z uo d ian EE er , w o k an l e p ing m u x ian sh ir ! _|0 4 4 4 4 3 3 2 2 0 3 3 4 4 5 5 2 2 4 4 3 3 4 4 0 0|1 2 2 2 2 1 2 2 2 2 2 2 2 1 1
0001_000528|0001_Angry|ZH|你转一个,我想学习下.|_ n i zh uan y i g e , w o x iang x ve x i x ia . _|0 2 2 3 3 2 2 5 5 0 2 2 3 3 2 2 2 2 4 4 0 0|1 2 2 2 2 1 2 2 2 2 2 1 1
0001_000626|0001_Angry|ZH|我当然喜欢,我很注意颜面.|_ w o d ang r an x i h uan , w o h en zh u y i y En m ian . _|0 3 3 1 1 2 2 3 3 5 5 0 2 2 3 3 4 4 4 4 2 2 4 4 0 0|1 2 2 2 2 2 1 2 2 2 2 2 2 1 1
0001_000491|0001_Angry|ZH|你可以去问鹦鹉啊,鹦鹉会说话.|_ n i k e y i q v w en y ing w u AA a , y ing w u h ui sh uo h ua . _|0 3 3 2 2 3 3 4 4 4 4 1 1 3 3 5 5 0 1 1 3 3 4 4 1 1 4 4 0 0|1 2 2 2 2 2 2 2 2 1 2 2 2 2 2 1 1
0001_000690|0001_Angry|ZH|每天晚上跟你互道晚安真幸福.|_ m ei t ian w an sh ang g en n i h u d ao w an AA an zh en x ing f u . _|0 3 3 1 1 3 3 4 4 1 1 3 3 4 4 4 4 3 3 1 1 1 1 4 4 5 5 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000482|0001_Angry|ZH|是你最牵挂的那个女人.|_ sh ir n i z ui q ian g ua d e n a g e n v r en . _|0 4 4 3 3 4 4 1 1 4 4 5 5 4 4 5 5 3 3 2 2 0 0|1 2 2 2 2 2 2 2 2 2 2 1 1
0001_000553|0001_Angry|ZH|希望我有一天也可以去那里.|_ x i w ang w o y ou y i t ian y E k e y i q v n a l i . _|0 1 1 4 4 2 2 3 3 4 4 1 1 3 3 2 2 3 3 4 4 4 4 3 3 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000533|0001_Angry|ZH|你绝对猜不到她准备要孩子了.|_ n i j ve d ui c ai b u d ao t a zh un b ei y ao h ai z i0 l e . _|0 3 3 2 2 4 4 1 1 2 2 4 4 1 1 3 3 4 4 4 4 2 2 5 5 5 5 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000579|0001_Angry|ZH|这个位置不错,下车.|_ zh e g e w ei zh ir b u c uo , x ia ch e . _|0 4 4 5 5 4 4 5 5 2 2 4 4 0 4 4 1 1 0 0|1 2 2 2 2 2 2 1 2 2 1 1
0001_000500|0001_Angry|ZH|这样子比较有趣.|_ zh e y ang z i0 b i j iao y ou q v . _|0 4 4 4 4 5 5 3 3 4 4 3 3 4 4 0 0|1 2 2 2 2 2 2 2 1 1
0001_000362|0001_Angry|ZH|你每次谈恋爱都像现在这样.|_ n i m ei c i0 t an l ian AA ai d ou x iang x ian z ai zh e y ang . _|0 2 2 3 3 4 4 2 2 4 4 4 4 1 1 4 4 4 4 4 4 4 4 4 4 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000505|0001_Angry|ZH|我只打算放松一下自己.|_ w o zh ir d a s uan f ang s ong y i x ia z i0 j i . _|0 2 2 3 3 3 3 5 5 4 4 1 1 2 2 4 4 4 4 3 3 0 0|1 2 2 2 2 2 2 2 2 2 2 1 1
0001_000434|0001_Angry|ZH|他好像跟他的秘书有过一腿.|_ t a h ao x iang g en t a d e m i sh u y ou g uo y i t ui . _|0 1 1 3 3 4 4 1 1 1 1 5 5 4 4 1 1 3 3 5 5 4 4 3 3 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000622|0001_Angry|ZH|沈阳明天有雷阵雨,多云转晴.|_ sh en y ang m ing t ian y ou l ei zh en y v , d uo y vn zh uan q ing . _|0 3 3 2 2 2 2 1 1 3 3 2 2 4 4 3 3 0 1 1 2 2 3 3 2 2 0 0|1 2 2 2 2 2 2 2 2 1 2 2 2 2 1 1
0001_000459|0001_Angry|ZH|太棒了,我其实挺饿的.|_ t ai b ang l e , w o q i sh ir t ing EE e d e . _|0 4 4 4 4 5 5 0 3 3 2 2 2 2 3 3 4 4 5 5 0 0|1 2 2 2 1 2 2 2 2 2 2 1 1
0001_000631|0001_Angry|ZH|晚安,么么哒,满天都是小星星.|_ w an AA an , m e m e d a , m an t ian d ou sh ir x iao x ing x ing . _|0 3 3 1 1 0 5 5 5 5 5 5 0 3 3 1 1 1 1 4 4 3 3 1 1 5 5 0 0|1 2 2 1 2 2 2 1 2 2 2 2 2 2 2 1 1
0001_000460|0001_Angry|ZH|自己的事情要自己做.|_ z i0 j i d e sh ir q ing y ao z i0 j i z uo . _|0 4 4 3 3 5 5 4 4 5 5 4 4 4 4 3 3 4 4 0 0|1 2 2 2 2 2 2 2 2 2 1 1
0001_000354|0001_Angry|ZH|不管怎么说主队好象是志在夺魁.|_ b u g uan z en m e sh uo zh u d ui h ao x iang sh ir zh ir z ai d uo k ui . _|0 4 4 3 3 3 3 5 5 1 1 3 3 4 4 3 3 4 4 4 4 4 4 4 4 2 2 2 2 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000654|0001_Angry|ZH|我刚从苏格兰回来.|_ w o g ang c ong s u g e l an h ui l ai . _|0 3 3 1 1 2 2 1 1 2 2 2 2 2 2 5 5 0 0|1 2 2 2 2 2 2 2 2 1 1
0001_000677|0001_Angry|ZH|我讨厌吃醋,偶是不懂,你懂.|_ w o t ao y En ch ir c u , OO ou sh ir b u d ong , n i d ong . _|0 2 2 3 3 4 4 1 1 4 4 0 3 3 4 4 4 4 3 3 0 2 2 3 3 0 0|1 2 2 2 2 2 1 2 2 2 2 1 2 2 1 1
0001_000672|0001_Angry|ZH|等待你的指令,随时可为你效劳.|_ d eng d ai n i d e zh ir l ing , s ui sh ir k e w ei n i x iao l ao . _|0 3 3 4 4 3 3 5 5 3 3 4 4 0 2 2 2 2 3 3 4 4 3 3 4 4 2 2 0 0|1 2 2 2 2 2 2 1 2 2 2 2 2 2 2 1 1
0001_000436|0001_Angry|ZH|真想不到,游泳竟有如此多的好处,|_ zh en x iang b u d ao , y ou y ong j ing y ou r u c i0 d uo d e h ao ch u , _|0 1 1 3 3 5 5 4 4 0 2 2 3 3 4 4 3 3 2 2 3 3 1 1 5 5 3 3 4 4 0 0|1 2 2 2 2 1 2 2 2 2 2 2 2 2 2 2 1 1
0001_000635|0001_Angry|ZH|自己保重,记得要常联系.|_ z i0 j i b ao zh ong , j i d e y ao ch ang l ian x i . _|0 4 4 3 3 3 3 4 4 0 4 4 5 5 4 4 2 2 2 2 4 4 0 0|1 2 2 2 2 1 2 2 2 2 2 2 1 1
0001_000458|0001_Angry|ZH|让我们看看哪一种球技比较好.|_ r ang w o m en k an k an n a y i zh ong q iu j i b i j iao h ao . _|0 4 4 3 3 5 5 4 4 5 5 3 3 4 4 3 3 2 2 4 4 3 3 4 4 3 3 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000651|0001_Angry|ZH|播放歌单收藏,脑筋可动得真快.|_ b o f ang g e d an sh ou c ang , n ao j in k e d ong d e zh en k uai . _|0 1 1 4 4 1 1 1 1 1 1 2 2 0 3 3 1 1 3 3 4 4 5 5 1 1 4 4 0 0|1 2 2 2 2 2 2 1 2 2 2 2 2 2 2 1 1
0001_000647|0001_Angry|ZH|三个,两个儿子一个女儿.|_ s an g e , l iang g e EE er z i0 y i g e n v EE er . _|0 1 1 5 5 0 3 3 5 5 2 2 5 5 2 2 5 5 3 3 2 2 0 0|1 2 2 1 2 2 2 2 2 2 2 2 1 1
0001_000445|0001_Angry|ZH|我倒是有一个爱好收藏古董.|_ w o d ao sh ir y ou y i g e AA ai h ao sh ou c ang g u d ong . _|0 3 3 4 4 4 4 3 3 2 2 5 5 4 4 4 4 1 1 2 2 2 2 3 3 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000366|0001_Angry|ZH|他一定是一眼就被你迷住了.|_ t a y i d ing sh ir y i y En j iu b ei n i m i zh u l e . _|0 1 1 2 2 4 4 4 4 4 4 3 3 4 4 4 4 3 3 2 2 4 4 5 5 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000425|0001_Angry|ZH|我也想去看可爱的熊猫.|_ w o y E x iang q v k an k e AA ai d e x iong m ao . _|0 3 3 2 2 3 3 4 4 4 4 3 3 4 4 5 5 2 2 1 1 0 0|1 2 2 2 2 2 2 2 2 2 2 1 1
0001_000481|0001_Angry|ZH|吝啬鬼!他每天还骑自行车上学!|_ l in s e g ui ! t a m ei t ian h ai q i z i0 x ing ch e sh ang x ve ! _|0 4 4 4 4 3 3 0 1 1 3 3 1 1 2 2 2 2 4 4 2 2 1 1 4 4 2 2 0 0|1 2 2 2 1 2 2 2 2 2 2 2 2 2 2 1 1
0001_000487|0001_Angry|ZH|也许能帮助你把事情弄清楚.|_ y E x v n eng b ang zh u n i b a sh ir q ing n ong q ing ch u . _|0 2 2 3 3 2 2 1 1 4 4 2 2 3 3 4 4 5 5 4 4 1 1 5 5 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000532|0001_Angry|ZH|大概足够支持我生活三个月的.|_ d a g ai z u g ou zh ir ch ir w o sh eng h uo s an g e y ve d e . _|0 4 4 4 4 2 2 4 4 1 1 2 2 3 3 1 1 2 2 1 1 5 5 4 4 5 5 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000694|0001_Angry|ZH|很漂亮,不过人多拥挤.|_ h en p iao l iang , b u g uo r en d uo y ong j i . _|0 3 3 4 4 5 5 0 2 2 4 4 2 2 1 1 1 1 3 3 0 0|1 2 2 2 1 2 2 2 2 2 2 1 1
0001_000545|0001_Angry|ZH|我以为你们国家的人都是麻将高手.|_ w o y i w ei n i m en g uo j ia d e r en d ou sh ir m a j iang g ao sh ou . _|0 2 2 3 3 2 2 3 3 5 5 2 2 1 1 5 5 2 2 1 1 4 4 2 2 1 1 1 1 3 3 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000437|0001_Angry|ZH|是没什么但是挺别扭的.|_ sh ir m ei sh en m e d an sh ir t ing b ie n iu d e . _|0 4 4 2 2 2 2 5 5 4 4 4 4 3 3 4 4 5 5 5 5 0 0|1 2 2 2 2 2 2 2 2 2 2 1 1
0001_000531|0001_Angry|ZH|时间对珍尼来说是没有用的.|_ sh ir j ian d ui zh en n i l ai sh uo sh ir m ei y ou y ong d e . _|0 2 2 1 1 4 4 1 1 2 2 2 2 1 1 4 4 2 2 3 3 4 4 5 5 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000594|0001_Angry|ZH|我的直系亲属人数不多.|_ w o d e zh ir x i q in sh u r en sh u b u d uo . _|0 3 3 5 5 2 2 4 4 1 1 3 3 2 2 4 4 4 4 1 1 0 0|1 2 2 2 2 2 2 2 2 2 2 1 1
0001_000539|0001_Angry|ZH|我是一名教师,你可是好眼光.|_ w o sh ir y i m ing j iao sh ir , n i k e sh ir h ao y En g uang . _|0 3 3 4 4 4 4 2 2 4 4 1 1 0 2 2 3 3 4 4 2 2 3 3 1 1 0 0|1 2 2 2 2 2 2 1 2 2 2 2 2 2 1 1
0001_000497|0001_Angry|ZH|不知道.或许一双新鞋.|_ b u zh ir d ao . h uo x v y i sh uang x in x ie . _|0 4 4 1 1 4 4 0 4 4 3 3 4 4 1 1 1 1 2 2 0 0|1 2 2 2 1 2 2 2 2 2 2 1 1
0001_000452|0001_Angry|ZH|我昨天遇到马克,他看起来很忧郁.|_ w o z uo t ian y v d ao m a k e , t a k an q i l ai h en y ou y v . _|0 3 3 2 2 1 1 4 4 4 4 3 3 4 4 0 1 1 4 4 3 3 5 5 3 3 1 1 4 4 0 0|1 2 2 2 2 2 2 2 1 2 2 2 2 2 2 2 1 1
0001_000684|0001_Angry|ZH|我曾经养过,我太高兴了.|_ w o c eng j ing y ang g uo , w o t ai g ao x ing l e . _|0 3 3 2 2 1 1 3 3 4 4 0 3 3 4 4 1 1 4 4 5 5 0 0|1 2 2 2 2 2 1 2 2 2 2 2 1 1
0001_000625|0001_Angry|ZH|然后再找一个音乐播放器,|_ r an h ou z ai zh ao y i g e y in y ve b o f ang q i , _|0 2 2 4 4 4 4 3 3 2 2 5 5 1 1 4 4 1 1 4 4 4 4 0 0|1 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000502|0001_Angry|ZH|小心脚下.人行道上有个坑.|_ x iao x in j iao x ia . r en x ing d ao sh ang y ou g e k eng . _|0 3 3 1 1 3 3 5 5 0 2 2 2 2 4 4 4 4 3 3 5 5 1 1 0 0|1 2 2 2 2 1 2 2 2 2 2 2 2 1 1
0001_000419|0001_Angry|ZH|以后不要喝那么多了,伤身体.|_ y i h ou b u y ao h e n a m e d uo l e , sh ang sh en t i . _|0 3 3 4 4 2 2 4 4 1 1 4 4 5 5 1 1 5 5 0 1 1 1 1 3 3 0 0|1 2 2 2 2 2 2 2 2 2 1 2 2 2 1 1
0001_000483|0001_Angry|ZH|是不是依然觉得我很可爱.|_ sh ir b u sh ir y i r an j ve d e w o h en k e AA ai . _|0 4 4 5 5 4 4 1 1 2 2 2 2 5 5 2 2 3 3 3 3 4 4 0 0|1 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000364|0001_Angry|ZH|谁你也不认识,我很乐意帮助你.|_ sh ui n i y E b u r en sh ir , w o h en l e y i b ang zh u n i . _|0 2 2 2 2 3 3 2 2 4 4 5 5 0 2 2 3 3 4 4 4 4 1 1 4 4 3 3 0 0|1 2 2 2 2 2 2 1 2 2 2 2 2 2 2 1 1
0001_000620|0001_Angry|ZH|没有找到你想删除的闹钟.|_ m ei y ou zh ao d ao n i x iang sh an ch u d e n ao zh ong . _|0 2 2 3 3 3 3 4 4 2 2 3 3 1 1 2 2 5 5 4 4 1 1 0 0|1 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000687|0001_Angry|ZH|你看起来很高兴,眼睛闪闪发亮.|_ n i k an q i l ai h en g ao x ing , y En j ing sh an sh an f a l iang . _|0 3 3 4 4 3 3 5 5 3 3 1 1 4 4 0 3 3 5 5 3 3 5 5 1 1 4 4 0 0|1 2 2 2 2 2 2 2 1 2 2 2 2 2 2 1 1
0001_000678|0001_Angry|ZH|太棒了,我们下午可以在湖里划船.|_ t ai b ang l e , w o m en x ia w u k e y i z ai h u l i h ua ch uan . _|0 4 4 4 4 5 5 0 3 3 5 5 4 4 3 3 2 2 3 3 4 4 2 2 5 5 2 2 2 2 0 0|1 2 2 2 1 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000444|0001_Angry|ZH|很神奇的样子,我搞不懂为什么.|_ h en sh en q i d e y ang z i0 , w o g ao b u d ong w ei sh en m e . _|0 3 3 2 2 2 2 5 5 4 4 5 5 0 3 3 3 3 5 5 3 3 4 4 2 2 5 5 0 0|1 2 2 2 2 2 2 1 2 2 2 2 2 2 2 1 1
0001_000494|0001_Angry|ZH|节食减肥很痛苦.|_ j ie sh ir j ian f ei h en t ong k u . _|0 2 2 2 2 3 3 2 2 3 3 4 4 3 3 0 0|1 2 2 2 2 2 2 2 1 1
0001_000695|0001_Angry|ZH|别总是闲着,找点事情干.|_ b ie z ong sh ir x ian zh e , zh ao d ian sh ir q ing g an . _|0 2 2 3 3 4 4 2 2 5 5 0 2 2 3 3 4 4 5 5 4 4 0 0|1 2 2 2 2 2 1 2 2 2 2 2 1 1
0001_000546|0001_Angry|ZH|我饿啦,我想去吃点东西.|_ w o EE e l a , w o x iang q v ch ir d ian d ong x i . _|0 3 3 4 4 5 5 0 2 2 3 3 4 4 1 1 3 3 1 1 5 5 0 0|1 2 2 2 1 2 2 2 2 2 2 2 1 1
0001_000637|0001_Angry|ZH|我太喜欢听了,所以不断重复着听.|_ w o t ai x i h uan t ing l e , s uo y i b u d uan ch ong f u zh e t ing . _|0 3 3 4 4 3 3 5 5 1 1 5 5 0 2 2 3 3 2 2 4 4 2 2 4 4 5 5 1 1 0 0|1 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 1 1
0001_000474|0001_Angry|ZH|是的,请返还我的钱,谢谢.|_ sh ir d e , q ing f an h uan w o d e q ian , x ie x ie . _|0 4 4 5 5 0 2 2 3 3 2 2 3 3 5 5 2 2 0 4 4 5 5 0 0|1 2 2 1 2 2 2 2 2 2 1 2 2 1 1
0001_000697|0001_Angry|ZH|这两块是唐朝不同时期铸造的.|_ zh e l iang k uai sh ir t ang ch ao b u t ong sh ir q i zh u z ao d e . _|0 4 4 3 3 4 4 4 4 2 2 2 2 4 4 2 2 2 2 1 1 4 4 4 4 5 5 0 0|1 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1
0001_000591|0001_Angry|ZH|请勿进入竹林.不让进.|_ q ing w u j in r u zh u l in . b u r ang j in . _|0 3 3 4 4 4 4 4 4 2 2 2 2 0 2 2 4 4 4 4 0 0|1 2 2 2 2 2 2 1 2 2 2 1 1
0001_000455|0001_Angry|ZH|我们俩合不来,还经常吵架.|_ w o m en l ia h e b u l ai , h ai j ing ch ang ch ao j ia . _|0 3 3 5 5 3 3 2 2 5 5 2 2 0 2 2 1 1 2 2 3 3 4 4 0 0|1 2 2 2 2 2 2 1 2 2 2 2 2 1 1
0001_000649|0001_Angry|ZH|是的,我刚撞到了桌子.|_ sh ir d e , w o g ang zh uang d ao l e zh uo z i0 . _|0 4 4 5 5 0 3 3 1 1 4 4 4 4 5 5 1 1 5 5 0 0|1 2 2 1 2 2 2 2 2 2 2 1 1
0001_000442|0001_Angry|ZH|不会这么凑巧吧!我也是十六.|_ b u h ui zh e m e c ou q iao b a ! w o y E sh ir sh ir l iu . _|0 2 2 4 4 4 4 5 5 4 4 3 3 5 5 0 2 2 3 3 4 4 2 2 4 4 0 0|1 2 2 2 2 2 2 2 1 2 2 2 2 2 1 1
0001_000552|0001_Angry|ZH|那就一会再说,我好害怕.|_ n a j iu y i h ui z ai sh uo , w o h ao h ai p a . _|0 4 4 4 4 2 2 4 4 4 4 1 1 0 2 2 3 3 4 4 4 4 0 0|1 2 2 2 2 2 2 1 2 2 2 2 1 1
0001_000361|0001_Angry|ZH|妇女节快乐.我永远爱你,妈妈.|_ f u n v j ie k uai l e . w o y ong y van AA ai n i , m a m a . _|0 4 4 3 3 2 2 4 4 4 4 0 3 3 2 2 3 3 4 4 3 3 0 1 1 5 5 0 0|1 2 2 2 2 2 1 2 2 2 2 2 1 2 2 1 1
0001_000426|0001_Angry|ZH|是的,你是个大块头,我是守门员.|_ sh ir d e , n i sh ir g e d a k uai t ou , w o sh ir sh ou m en y van . _|0 4 4 5 5 0 3 3 4 4 5 5 4 4 4 4 2 2 0 3 3 4 4 3 3 2 2 2 2 0 0|1 2 2 1 2 2 2 2 2 2 1 2 2 2 2 2 1 1
0001_000519|0001_Angry|ZH|让我再想想,真相已经上传了.|_ r ang w o z ai x iang x iang , zh en x iang y i j ing sh ang ch uan l e . _|0 4 4 3 3 4 4 3 3 5 5 0 1 1 4 4 3 3 1 1 4 4 2 2 5 5 0 0|1 2 2 2 2 2 1 2 2 2 2 2 2 2 1 1

2
filelists/val.list Normal file
View File

@@ -0,0 +1,2 @@
0001_000529|0001_Angry|ZH|她和维克分手了,所以她申请转调.|_ t a h e w ei k e f en sh ou l e , s uo y i t a sh en q ing zh uan d iao . _|0 1 1 2 2 2 2 4 4 1 1 3 3 5 5 0 2 2 3 3 1 1 1 1 3 3 3 3 4 4 0 0|1 2 2 2 2 2 2 2 1 2 2 2 2 2 2 2 1 1
0001_000443|0001_Angry|ZH|别不好意思.再多吃些鸡肉.|_ b ie b u h ao y i s i0 . z ai d uo ch ir x ie j i r ou . _|0 2 2 4 4 3 3 4 4 5 5 0 4 4 1 1 1 1 1 1 1 1 4 4 0 0|1 2 2 2 2 2 1 2 2 2 2 2 2 1 1

61
losses.py Normal file
View File

@@ -0,0 +1,61 @@
import torch
from torch.nn import functional as F
import commons
def feature_loss(fmap_r, fmap_g):
loss = 0
for dr, dg in zip(fmap_r, fmap_g):
for rl, gl in zip(dr, dg):
rl = rl.float().detach()
gl = gl.float()
loss += torch.mean(torch.abs(rl - gl))
return loss * 2
def discriminator_loss(disc_real_outputs, disc_generated_outputs):
loss = 0
r_losses = []
g_losses = []
for dr, dg in zip(disc_real_outputs, disc_generated_outputs):
dr = dr.float()
dg = dg.float()
r_loss = torch.mean((1-dr)**2)
g_loss = torch.mean(dg**2)
loss += (r_loss + g_loss)
r_losses.append(r_loss.item())
g_losses.append(g_loss.item())
return loss, r_losses, g_losses
def generator_loss(disc_outputs):
loss = 0
gen_losses = []
for dg in disc_outputs:
dg = dg.float()
l = torch.mean((1-dg)**2)
gen_losses.append(l)
loss += l
return loss, gen_losses
def kl_loss(z_p, logs_q, m_p, logs_p, z_mask):
"""
z_p, logs_q: [b, h, t_t]
m_p, logs_p: [b, h, t_t]
"""
z_p = z_p.float()
logs_q = logs_q.float()
m_p = m_p.float()
logs_p = logs_p.float()
z_mask = z_mask.float()
kl = logs_p - logs_q - 0.5
kl += 0.5 * ((z_p - m_p)**2) * torch.exp(-2. * logs_p)
kl = torch.sum(kl * z_mask)
l = kl / torch.sum(z_mask)
return l

112
mel_processing.py Normal file
View File

@@ -0,0 +1,112 @@
import math
import os
import random
import torch
from torch import nn
import torch.nn.functional as F
import torch.utils.data
import numpy as np
import librosa
import librosa.util as librosa_util
from librosa.util import normalize, pad_center, tiny
from scipy.signal import get_window
from scipy.io.wavfile import read
from librosa.filters import mel as librosa_mel_fn
MAX_WAV_VALUE = 32768.0
def dynamic_range_compression_torch(x, C=1, clip_val=1e-5):
"""
PARAMS
------
C: compression factor
"""
return torch.log(torch.clamp(x, min=clip_val) * C)
def dynamic_range_decompression_torch(x, C=1):
"""
PARAMS
------
C: compression factor used to compress
"""
return torch.exp(x) / C
def spectral_normalize_torch(magnitudes):
output = dynamic_range_compression_torch(magnitudes)
return output
def spectral_de_normalize_torch(magnitudes):
output = dynamic_range_decompression_torch(magnitudes)
return output
mel_basis = {}
hann_window = {}
def spectrogram_torch(y, n_fft, sampling_rate, hop_size, win_size, center=False):
if torch.min(y) < -1.:
print('min value is ', torch.min(y))
if torch.max(y) > 1.:
print('max value is ', torch.max(y))
global hann_window
dtype_device = str(y.dtype) + '_' + str(y.device)
wnsize_dtype_device = str(win_size) + '_' + dtype_device
if wnsize_dtype_device not in hann_window:
hann_window[wnsize_dtype_device] = torch.hann_window(win_size).to(dtype=y.dtype, device=y.device)
y = torch.nn.functional.pad(y.unsqueeze(1), (int((n_fft-hop_size)/2), int((n_fft-hop_size)/2)), mode='reflect')
y = y.squeeze(1)
spec = torch.stft(y, n_fft, hop_length=hop_size, win_length=win_size, window=hann_window[wnsize_dtype_device],
center=center, pad_mode='reflect', normalized=False, onesided=True, return_complex=False)
spec = torch.sqrt(spec.pow(2).sum(-1) + 1e-6)
return spec
def spec_to_mel_torch(spec, n_fft, num_mels, sampling_rate, fmin, fmax):
global mel_basis
dtype_device = str(spec.dtype) + '_' + str(spec.device)
fmax_dtype_device = str(fmax) + '_' + dtype_device
if fmax_dtype_device not in mel_basis:
mel = librosa_mel_fn(sampling_rate, n_fft, num_mels, fmin, fmax)
mel_basis[fmax_dtype_device] = torch.from_numpy(mel).to(dtype=spec.dtype, device=spec.device)
spec = torch.matmul(mel_basis[fmax_dtype_device], spec)
spec = spectral_normalize_torch(spec)
return spec
def mel_spectrogram_torch(y, n_fft, num_mels, sampling_rate, hop_size, win_size, fmin, fmax, center=False):
if torch.min(y) < -1.:
print('min value is ', torch.min(y))
if torch.max(y) > 1.:
print('max value is ', torch.max(y))
global mel_basis, hann_window
dtype_device = str(y.dtype) + '_' + str(y.device)
fmax_dtype_device = str(fmax) + '_' + dtype_device
wnsize_dtype_device = str(win_size) + '_' + dtype_device
if fmax_dtype_device not in mel_basis:
mel = librosa_mel_fn(sampling_rate, n_fft, num_mels, fmin, fmax)
mel_basis[fmax_dtype_device] = torch.from_numpy(mel).to(dtype=y.dtype, device=y.device)
if wnsize_dtype_device not in hann_window:
hann_window[wnsize_dtype_device] = torch.hann_window(win_size).to(dtype=y.dtype, device=y.device)
y = torch.nn.functional.pad(y.unsqueeze(1), (int((n_fft-hop_size)/2), int((n_fft-hop_size)/2)), mode='reflect')
y = y.squeeze(1)
spec = torch.stft(y, n_fft, hop_length=hop_size, win_length=win_size, window=hann_window[wnsize_dtype_device],
center=center, pad_mode='reflect', normalized=False, onesided=True, return_complex=False)
spec = torch.sqrt(spec.pow(2).sum(-1) + 1e-6)
spec = torch.matmul(mel_basis[fmax_dtype_device], spec)
spec = spectral_normalize_torch(spec)
return spec

596
models.py Normal file
View File

@@ -0,0 +1,596 @@
import copy
import math
import torch
from torch import nn
from torch.nn import functional as F
import commons
import modules
import attentions
import monotonic_align
from torch.nn import Conv1d, ConvTranspose1d, AvgPool1d, Conv2d
from torch.nn.utils import weight_norm, remove_weight_norm, spectral_norm
from GST import GST
from commons import init_weights, get_padding
from text import symbols, num_tones, num_languages
class StochasticDurationPredictor(nn.Module):
def __init__(self, in_channels, filter_channels, kernel_size, p_dropout, n_flows=4, gin_channels=0):
super().__init__()
filter_channels = in_channels # it needs to be removed from future version.
self.in_channels = in_channels
self.filter_channels = filter_channels
self.kernel_size = kernel_size
self.p_dropout = p_dropout
self.n_flows = n_flows
self.gin_channels = gin_channels
self.log_flow = modules.Log()
self.flows = nn.ModuleList()
self.flows.append(modules.ElementwiseAffine(2))
for i in range(n_flows):
self.flows.append(modules.ConvFlow(2, filter_channels, kernel_size, n_layers=3))
self.flows.append(modules.Flip())
self.post_pre = nn.Conv1d(1, filter_channels, 1)
self.post_proj = nn.Conv1d(filter_channels, filter_channels, 1)
self.post_convs = modules.DDSConv(filter_channels, kernel_size, n_layers=3, p_dropout=p_dropout)
self.post_flows = nn.ModuleList()
self.post_flows.append(modules.ElementwiseAffine(2))
for i in range(4):
self.post_flows.append(modules.ConvFlow(2, filter_channels, kernel_size, n_layers=3))
self.post_flows.append(modules.Flip())
self.pre = nn.Conv1d(in_channels, filter_channels, 1)
self.proj = nn.Conv1d(filter_channels, filter_channels, 1)
self.convs = modules.DDSConv(filter_channels, kernel_size, n_layers=3, p_dropout=p_dropout)
if gin_channels != 0:
self.cond = nn.Conv1d(gin_channels, filter_channels, 1)
def forward(self, x, x_mask, w=None, g=None, reverse=False, noise_scale=1.0):
x = torch.detach(x)
x = self.pre(x)
if g is not None:
g = torch.detach(g)
x = x + self.cond(g)
x = self.convs(x, x_mask)
x = self.proj(x) * x_mask
if not reverse:
flows = self.flows
assert w is not None
logdet_tot_q = 0
h_w = self.post_pre(w)
h_w = self.post_convs(h_w, x_mask)
h_w = self.post_proj(h_w) * x_mask
e_q = torch.randn(w.size(0), 2, w.size(2)).to(device=x.device, dtype=x.dtype) * x_mask
z_q = e_q
for flow in self.post_flows:
z_q, logdet_q = flow(z_q, x_mask, g=(x + h_w))
logdet_tot_q += logdet_q
z_u, z1 = torch.split(z_q, [1, 1], 1)
u = torch.sigmoid(z_u) * x_mask
z0 = (w - u) * x_mask
logdet_tot_q += torch.sum((F.logsigmoid(z_u) + F.logsigmoid(-z_u)) * x_mask, [1, 2])
logq = torch.sum(-0.5 * (math.log(2 * math.pi) + (e_q ** 2)) * x_mask, [1, 2]) - logdet_tot_q
logdet_tot = 0
z0, logdet = self.log_flow(z0, x_mask)
logdet_tot += logdet
z = torch.cat([z0, z1], 1)
for flow in flows:
z, logdet = flow(z, x_mask, g=x, reverse=reverse)
logdet_tot = logdet_tot + logdet
nll = torch.sum(0.5 * (math.log(2 * math.pi) + (z ** 2)) * x_mask, [1, 2]) - logdet_tot
return nll + logq # [b]
else:
flows = list(reversed(self.flows))
flows = flows[:-2] + [flows[-1]] # remove a useless vflow
z = torch.randn(x.size(0), 2, x.size(2)).to(device=x.device, dtype=x.dtype) * noise_scale
for flow in flows:
z = flow(z, x_mask, g=x, reverse=reverse)
z0, z1 = torch.split(z, [1, 1], 1)
logw = z0
return logw
class DurationPredictor(nn.Module):
def __init__(self, in_channels, filter_channels, kernel_size, p_dropout, gin_channels=0):
super().__init__()
self.in_channels = in_channels
self.filter_channels = filter_channels
self.kernel_size = kernel_size
self.p_dropout = p_dropout
self.gin_channels = gin_channels
self.drop = nn.Dropout(p_dropout)
self.conv_1 = nn.Conv1d(in_channels, filter_channels, kernel_size, padding=kernel_size // 2)
self.norm_1 = modules.LayerNorm(filter_channels)
self.conv_2 = nn.Conv1d(filter_channels, filter_channels, kernel_size, padding=kernel_size // 2)
self.norm_2 = modules.LayerNorm(filter_channels)
self.proj = nn.Conv1d(filter_channels, 1, 1)
if gin_channels != 0:
self.cond = nn.Conv1d(gin_channels, in_channels, 1)
def forward(self, x, x_mask, g=None):
x = torch.detach(x)
if g is not None:
g = torch.detach(g)
x = x + self.cond(g)
x = self.conv_1(x * x_mask)
x = torch.relu(x)
x = self.norm_1(x)
x = self.drop(x)
x = self.conv_2(x * x_mask)
x = torch.relu(x)
x = self.norm_2(x)
x = self.drop(x)
x = self.proj(x * x_mask)
return x * x_mask
class TextEncoder(nn.Module):
def __init__(self,
n_vocab,
out_channels,
hidden_channels,
filter_channels,
n_heads,
n_layers,
kernel_size,
p_dropout):
super().__init__()
self.n_vocab = n_vocab
self.out_channels = out_channels
self.hidden_channels = hidden_channels
self.filter_channels = filter_channels
self.n_heads = n_heads
self.n_layers = n_layers
self.kernel_size = kernel_size
self.p_dropout = p_dropout
self.emb = nn.Embedding(len(symbols), hidden_channels)
nn.init.normal_(self.emb.weight, 0.0, hidden_channels ** -0.5)
self.tone_emb = nn.Embedding(num_tones, hidden_channels)
nn.init.normal_(self.tone_emb.weight, 0.0, hidden_channels ** -0.5)
self.language_emb = nn.Embedding(num_languages, hidden_channels)
nn.init.normal_(self.language_emb.weight, 0.0, hidden_channels ** -0.5)
self.bert_proj = nn.Conv1d(1024, hidden_channels, 1)
self.encoder = attentions.Encoder(
hidden_channels,
filter_channels,
n_heads,
n_layers,
kernel_size,
p_dropout)
self.proj = nn.Conv1d(hidden_channels, out_channels * 2, 1)
def forward(self, x, x_lengths, tone, language, bert):
x = (self.emb(x)+ self.tone_emb(tone)+ self.language_emb(language) +self.bert_proj(bert)) * math.sqrt(self.hidden_channels) # [b, t, h]
x = torch.transpose(x, 1, -1) # [b, h, t]
x_mask = torch.unsqueeze(commons.sequence_mask(x_lengths, x.size(2)), 1).to(x.dtype)
x = self.encoder(x * x_mask, x_mask)
stats = self.proj(x) * x_mask
m, logs = torch.split(stats, self.out_channels, dim=1)
return x, m, logs, x_mask
class ResidualCouplingBlock(nn.Module):
def __init__(self,
channels,
hidden_channels,
kernel_size,
dilation_rate,
n_layers,
n_flows=4,
gin_channels=0):
super().__init__()
self.channels = channels
self.hidden_channels = hidden_channels
self.kernel_size = kernel_size
self.dilation_rate = dilation_rate
self.n_layers = n_layers
self.n_flows = n_flows
self.gin_channels = gin_channels
self.flows = nn.ModuleList()
for i in range(n_flows):
self.flows.append(
modules.ResidualCouplingLayer(channels, hidden_channels, kernel_size, dilation_rate, n_layers,
gin_channels=gin_channels, mean_only=True))
self.flows.append(modules.Flip())
def forward(self, x, x_mask, g=None, reverse=False):
if not reverse:
for flow in self.flows:
x, _ = flow(x, x_mask, g=g, reverse=reverse)
else:
for flow in reversed(self.flows):
x = flow(x, x_mask, g=g, reverse=reverse)
return x
class PosteriorEncoder(nn.Module):
def __init__(self,
in_channels,
out_channels,
hidden_channels,
kernel_size,
dilation_rate,
n_layers,
gin_channels=0):
super().__init__()
self.in_channels = in_channels
self.out_channels = out_channels
self.hidden_channels = hidden_channels
self.kernel_size = kernel_size
self.dilation_rate = dilation_rate
self.n_layers = n_layers
self.gin_channels = gin_channels
self.pre = nn.Conv1d(in_channels, hidden_channels, 1)
self.enc = modules.WN(hidden_channels, kernel_size, dilation_rate, n_layers, gin_channels=gin_channels)
self.proj = nn.Conv1d(hidden_channels, out_channels * 2, 1)
def forward(self, x, x_lengths, g=None):
x_mask = torch.unsqueeze(commons.sequence_mask(x_lengths, x.size(2)), 1).to(x.dtype)
x = self.pre(x) * x_mask
x = self.enc(x, x_mask, g=g)
stats = self.proj(x) * x_mask
m, logs = torch.split(stats, self.out_channels, dim=1)
z = (m + torch.randn_like(m) * torch.exp(logs)) * x_mask
return z, m, logs, x_mask
class Generator(torch.nn.Module):
def __init__(self, initial_channel, resblock, resblock_kernel_sizes, resblock_dilation_sizes, upsample_rates,
upsample_initial_channel, upsample_kernel_sizes, gin_channels=0):
super(Generator, self).__init__()
self.num_kernels = len(resblock_kernel_sizes)
self.num_upsamples = len(upsample_rates)
self.conv_pre = Conv1d(initial_channel, upsample_initial_channel, 7, 1, padding=3)
resblock = modules.ResBlock1 if resblock == '1' else modules.ResBlock2
self.ups = nn.ModuleList()
for i, (u, k) in enumerate(zip(upsample_rates, upsample_kernel_sizes)):
self.ups.append(weight_norm(
ConvTranspose1d(upsample_initial_channel // (2 ** i), upsample_initial_channel // (2 ** (i + 1)),
k, u, padding=(k - u) // 2)))
self.resblocks = nn.ModuleList()
for i in range(len(self.ups)):
ch = upsample_initial_channel // (2 ** (i + 1))
for j, (k, d) in enumerate(zip(resblock_kernel_sizes, resblock_dilation_sizes)):
self.resblocks.append(resblock(ch, k, d))
self.conv_post = Conv1d(ch, 1, 7, 1, padding=3, bias=False)
self.ups.apply(init_weights)
if gin_channels != 0:
self.cond = nn.Conv1d(gin_channels, upsample_initial_channel, 1)
def forward(self, x, g=None):
x = self.conv_pre(x)
if g is not None:
x = x + self.cond(g)
for i in range(self.num_upsamples):
x = F.leaky_relu(x, modules.LRELU_SLOPE)
x = self.ups[i](x)
xs = None
for j in range(self.num_kernels):
if xs is None:
xs = self.resblocks[i * self.num_kernels + j](x)
else:
xs += self.resblocks[i * self.num_kernels + j](x)
x = xs / self.num_kernels
x = F.leaky_relu(x)
x = self.conv_post(x)
x = torch.tanh(x)
return x
def remove_weight_norm(self):
print('Removing weight norm...')
for l in self.ups:
remove_weight_norm(l)
for l in self.resblocks:
l.remove_weight_norm()
class DiscriminatorP(torch.nn.Module):
def __init__(self, period, kernel_size=5, stride=3, use_spectral_norm=False):
super(DiscriminatorP, self).__init__()
self.period = period
self.use_spectral_norm = use_spectral_norm
norm_f = weight_norm if use_spectral_norm == False else spectral_norm
self.convs = nn.ModuleList([
norm_f(Conv2d(1, 32, (kernel_size, 1), (stride, 1), padding=(get_padding(kernel_size, 1), 0))),
norm_f(Conv2d(32, 128, (kernel_size, 1), (stride, 1), padding=(get_padding(kernel_size, 1), 0))),
norm_f(Conv2d(128, 512, (kernel_size, 1), (stride, 1), padding=(get_padding(kernel_size, 1), 0))),
norm_f(Conv2d(512, 1024, (kernel_size, 1), (stride, 1), padding=(get_padding(kernel_size, 1), 0))),
norm_f(Conv2d(1024, 1024, (kernel_size, 1), 1, padding=(get_padding(kernel_size, 1), 0))),
])
self.conv_post = norm_f(Conv2d(1024, 1, (3, 1), 1, padding=(1, 0)))
def forward(self, x):
fmap = []
# 1d to 2d
b, c, t = x.shape
if t % self.period != 0: # pad first
n_pad = self.period - (t % self.period)
x = F.pad(x, (0, n_pad), "reflect")
t = t + n_pad
x = x.view(b, c, t // self.period, self.period)
for l in self.convs:
x = l(x)
x = F.leaky_relu(x, modules.LRELU_SLOPE)
fmap.append(x)
x = self.conv_post(x)
fmap.append(x)
x = torch.flatten(x, 1, -1)
return x, fmap
class DiscriminatorS(torch.nn.Module):
def __init__(self, use_spectral_norm=False):
super(DiscriminatorS, self).__init__()
norm_f = weight_norm if use_spectral_norm == False else spectral_norm
self.convs = nn.ModuleList([
norm_f(Conv1d(1, 16, 15, 1, padding=7)),
norm_f(Conv1d(16, 64, 41, 4, groups=4, padding=20)),
norm_f(Conv1d(64, 256, 41, 4, groups=16, padding=20)),
norm_f(Conv1d(256, 1024, 41, 4, groups=64, padding=20)),
norm_f(Conv1d(1024, 1024, 41, 4, groups=256, padding=20)),
norm_f(Conv1d(1024, 1024, 5, 1, padding=2)),
])
self.conv_post = norm_f(Conv1d(1024, 1, 3, 1, padding=1))
def forward(self, x):
fmap = []
for l in self.convs:
x = l(x)
x = F.leaky_relu(x, modules.LRELU_SLOPE)
fmap.append(x)
x = self.conv_post(x)
fmap.append(x)
x = torch.flatten(x, 1, -1)
return x, fmap
class MultiPeriodDiscriminator(torch.nn.Module):
def __init__(self, use_spectral_norm=False):
super(MultiPeriodDiscriminator, self).__init__()
periods = [2, 3, 5, 7, 11]
discs = [DiscriminatorS(use_spectral_norm=use_spectral_norm)]
discs = discs + [DiscriminatorP(i, use_spectral_norm=use_spectral_norm) for i in periods]
self.discriminators = nn.ModuleList(discs)
def forward(self, y, y_hat):
y_d_rs = []
y_d_gs = []
fmap_rs = []
fmap_gs = []
for i, d in enumerate(self.discriminators):
y_d_r, fmap_r = d(y)
y_d_g, fmap_g = d(y_hat)
y_d_rs.append(y_d_r)
y_d_gs.append(y_d_g)
fmap_rs.append(fmap_r)
fmap_gs.append(fmap_g)
return y_d_rs, y_d_gs, fmap_rs, fmap_gs
class ReferenceEncoder(nn.Module):
'''
inputs --- [N, Ty/r, n_mels*r] mels
outputs --- [N, ref_enc_gru_size]
'''
def __init__(self, spec_channels):
super().__init__()
self.spec_channels = spec_channels
ref_enc_filters = [32, 32, 64, 64, 128, 128]
K = len(ref_enc_filters)
filters = [1] + ref_enc_filters
convs = [weight_norm(nn.Conv2d(in_channels=filters[i],
out_channels=filters[i + 1],
kernel_size=(3, 3),
stride=(2, 2),
padding=(1, 1))) for i in range(K)]
self.convs = nn.ModuleList(convs)
# self.wns = nn.ModuleList([weight_norm(num_features=ref_enc_filters[i]) for i in range(K)])
out_channels = self.calculate_channels(spec_channels, 3, 2, 1, K)
self.gru = nn.GRU(input_size=ref_enc_filters[-1] * out_channels,
hidden_size=256 // 2,
batch_first=True)
def forward(self, inputs, mask=None):
N = inputs.size(0)
out = inputs.view(N, 1, -1, self.spec_channels) # [N, 1, Ty, n_freqs]
for conv in self.convs:
out = conv(out)
# out = wn(out)
out = F.relu(out) # [N, 128, Ty//2^K, n_mels//2^K]
out = out.transpose(1, 2) # [N, Ty//2^K, 128, n_mels//2^K]
T = out.size(1)
N = out.size(0)
out = out.contiguous().view(N, T, -1) # [N, Ty//2^K, 128*n_mels//2^K]
self.gru.flatten_parameters()
memory, out = self.gru(out) # out --- [1, N, 128]
return out.squeeze(0)
def calculate_channels(self, L, kernel_size, stride, pad, n_convs):
for i in range(n_convs):
L = (L - kernel_size + 2 * pad) // stride + 1
return L
class SynthesizerTrn(nn.Module):
"""
Synthesizer for Training
"""
def __init__(self,
n_vocab,
spec_channels,
segment_size,
inter_channels,
hidden_channels,
filter_channels,
n_heads,
n_layers,
kernel_size,
p_dropout,
resblock,
resblock_kernel_sizes,
resblock_dilation_sizes,
upsample_rates,
upsample_initial_channel,
upsample_kernel_sizes,
n_speakers=0,
gin_channels=0,
use_sdp=True,
**kwargs):
super().__init__()
self.n_vocab = n_vocab
self.spec_channels = spec_channels
self.inter_channels = inter_channels
self.hidden_channels = hidden_channels
self.filter_channels = filter_channels
self.n_heads = n_heads
self.n_layers = n_layers
self.kernel_size = kernel_size
self.p_dropout = p_dropout
self.resblock = resblock
self.resblock_kernel_sizes = resblock_kernel_sizes
self.resblock_dilation_sizes = resblock_dilation_sizes
self.upsample_rates = upsample_rates
self.upsample_initial_channel = upsample_initial_channel
self.upsample_kernel_sizes = upsample_kernel_sizes
self.segment_size = segment_size
self.n_speakers = n_speakers
self.gin_channels = gin_channels
self.use_sdp = use_sdp
self.enc_p = TextEncoder(n_vocab,
inter_channels,
hidden_channels,
filter_channels,
n_heads,
n_layers,
kernel_size,
p_dropout)
self.dec = Generator(inter_channels, resblock, resblock_kernel_sizes, resblock_dilation_sizes, upsample_rates,
upsample_initial_channel, upsample_kernel_sizes, gin_channels=gin_channels)
self.enc_q = PosteriorEncoder(spec_channels, inter_channels, hidden_channels, 5, 1, 16,
gin_channels=gin_channels)
self.flow = ResidualCouplingBlock(inter_channels, hidden_channels, 5, 1, 4, gin_channels=gin_channels)
self.sdp = StochasticDurationPredictor(hidden_channels, 192, 3, 0.5, 4, gin_channels=gin_channels)
self.dp = DurationPredictor(hidden_channels, 256, 3, 0.5, gin_channels=gin_channels)
if n_speakers > 1:
self.emb_g = nn.Embedding(n_speakers, gin_channels)
else:
self.ref_enc = ReferenceEncoder()
def forward(self, x, x_lengths, y, y_lengths, sid, tone, language, bert):
x, m_p, logs_p, x_mask = self.enc_p(x, x_lengths, tone, language, bert)
if self.n_speakers > 0:
g = self.emb_g(sid).unsqueeze(-1) # [b, h, 1]
else:
g = self.ref_enc(y.transpose(1,2)).unsqueeze(-1)
z, m_q, logs_q, y_mask = self.enc_q(y, y_lengths, g=g)
z_p = self.flow(z, y_mask, g=g)
with torch.no_grad():
# negative cross-entropy
s_p_sq_r = torch.exp(-2 * logs_p) # [b, d, t]
neg_cent1 = torch.sum(-0.5 * math.log(2 * math.pi) - logs_p, [1], keepdim=True) # [b, 1, t_s]
neg_cent2 = torch.matmul(-0.5 * (z_p ** 2).transpose(1, 2),
s_p_sq_r) # [b, t_t, d] x [b, d, t_s] = [b, t_t, t_s]
neg_cent3 = torch.matmul(z_p.transpose(1, 2), (m_p * s_p_sq_r)) # [b, t_t, d] x [b, d, t_s] = [b, t_t, t_s]
neg_cent4 = torch.sum(-0.5 * (m_p ** 2) * s_p_sq_r, [1], keepdim=True) # [b, 1, t_s]
neg_cent = neg_cent1 + neg_cent2 + neg_cent3 + neg_cent4
attn_mask = torch.unsqueeze(x_mask, 2) * torch.unsqueeze(y_mask, -1)
attn = monotonic_align.maximum_path(neg_cent, attn_mask.squeeze(1)).unsqueeze(1).detach()
w = attn.sum(2)
l_length_sdp = self.sdp(x, x_mask, w, g=g)
l_length_sdp = l_length_sdp / torch.sum(x_mask)
logw_ = torch.log(w + 1e-6) * x_mask
logw = self.dp(x, x_mask, g=g)
l_length_dp = torch.sum((logw - logw_) ** 2, [1, 2]) / torch.sum(x_mask) # for averaging
l_length = l_length_dp + l_length_sdp
# expand prior
m_p = torch.matmul(attn.squeeze(1), m_p.transpose(1, 2)).transpose(1, 2)
logs_p = torch.matmul(attn.squeeze(1), logs_p.transpose(1, 2)).transpose(1, 2)
z_slice, ids_slice = commons.rand_slice_segments(z, y_lengths, self.segment_size)
o = self.dec(z_slice, g=g)
return o, l_length, attn, ids_slice, x_mask, y_mask, (z, z_p, m_p, logs_p, m_q, logs_q)
def infer(self, x, x_lengths, sid, tone, language, bert, noise_scale=.667, length_scale=1, noise_scale_w=0.8, max_len=None, sdp_ratio=0,y=None):
x, m_p, logs_p, x_mask = self.enc_p(x, x_lengths, tone, language, bert)
# g = self.gst(y)
if self.n_speakers > 0:
g = self.emb_g(sid).unsqueeze(-1) # [b, h, 1]
else:
g = self.ref_enc(y.transpose(1,2)).unsqueeze(-1)
logw = self.sdp(x, x_mask, g=g, reverse=True, noise_scale=noise_scale_w) * (sdp_ratio) + self.dp(x, x_mask, g=g) * (1 - sdp_ratio)
w = torch.exp(logw) * x_mask * length_scale
w_ceil = torch.ceil(w)
y_lengths = torch.clamp_min(torch.sum(w_ceil, [1, 2]), 1).long()
y_mask = torch.unsqueeze(commons.sequence_mask(y_lengths, None), 1).to(x_mask.dtype)
attn_mask = torch.unsqueeze(x_mask, 2) * torch.unsqueeze(y_mask, -1)
attn = commons.generate_path(w_ceil, attn_mask)
m_p = torch.matmul(attn.squeeze(1), m_p.transpose(1, 2)).transpose(1, 2) # [b, t', t], [b, t, d] -> [b, d, t']
logs_p = torch.matmul(attn.squeeze(1), logs_p.transpose(1, 2)).transpose(1,
2) # [b, t', t], [b, t, d] -> [b, d, t']
z_p = m_p + torch.randn_like(m_p) * torch.exp(logs_p) * noise_scale
z = self.flow(z_p, y_mask, g=g, reverse=True)
o = self.dec((z * y_mask)[:, :, :max_len], g=g)
return o, attn, y_mask, (z, z_p, m_p, logs_p)
def voice_conversion(self, y, y_lengths, sid_src, sid_tgt):
assert self.n_speakers > 0, "n_speakers have to be larger than 0."
g_src = self.emb_g(sid_src).unsqueeze(-1)
g_tgt = self.emb_g(sid_tgt).unsqueeze(-1)
z, m_q, logs_q, y_mask = self.enc_q(y, y_lengths, g=g_src)
z_p = self.flow(z, y_mask, g=g_src)
z_hat = self.flow(z_p, y_mask, g=g_tgt, reverse=True)
o_hat = self.dec(z_hat * y_mask, g=g_tgt)
return o_hat, y_mask, (z, z_p, z_hat)

390
modules.py Normal file
View File

@@ -0,0 +1,390 @@
import copy
import math
import numpy as np
import scipy
import torch
from torch import nn
from torch.nn import functional as F
from torch.nn import Conv1d, ConvTranspose1d, AvgPool1d, Conv2d
from torch.nn.utils import weight_norm, remove_weight_norm
import commons
from commons import init_weights, get_padding
from transforms import piecewise_rational_quadratic_transform
LRELU_SLOPE = 0.1
class LayerNorm(nn.Module):
def __init__(self, channels, eps=1e-5):
super().__init__()
self.channels = channels
self.eps = eps
self.gamma = nn.Parameter(torch.ones(channels))
self.beta = nn.Parameter(torch.zeros(channels))
def forward(self, x):
x = x.transpose(1, -1)
x = F.layer_norm(x, (self.channels,), self.gamma, self.beta, self.eps)
return x.transpose(1, -1)
class ConvReluNorm(nn.Module):
def __init__(self, in_channels, hidden_channels, out_channels, kernel_size, n_layers, p_dropout):
super().__init__()
self.in_channels = in_channels
self.hidden_channels = hidden_channels
self.out_channels = out_channels
self.kernel_size = kernel_size
self.n_layers = n_layers
self.p_dropout = p_dropout
assert n_layers > 1, "Number of layers should be larger than 0."
self.conv_layers = nn.ModuleList()
self.norm_layers = nn.ModuleList()
self.conv_layers.append(nn.Conv1d(in_channels, hidden_channels, kernel_size, padding=kernel_size//2))
self.norm_layers.append(LayerNorm(hidden_channels))
self.relu_drop = nn.Sequential(
nn.ReLU(),
nn.Dropout(p_dropout))
for _ in range(n_layers-1):
self.conv_layers.append(nn.Conv1d(hidden_channels, hidden_channels, kernel_size, padding=kernel_size//2))
self.norm_layers.append(LayerNorm(hidden_channels))
self.proj = nn.Conv1d(hidden_channels, out_channels, 1)
self.proj.weight.data.zero_()
self.proj.bias.data.zero_()
def forward(self, x, x_mask):
x_org = x
for i in range(self.n_layers):
x = self.conv_layers[i](x * x_mask)
x = self.norm_layers[i](x)
x = self.relu_drop(x)
x = x_org + self.proj(x)
return x * x_mask
class DDSConv(nn.Module):
"""
Dialted and Depth-Separable Convolution
"""
def __init__(self, channels, kernel_size, n_layers, p_dropout=0.):
super().__init__()
self.channels = channels
self.kernel_size = kernel_size
self.n_layers = n_layers
self.p_dropout = p_dropout
self.drop = nn.Dropout(p_dropout)
self.convs_sep = nn.ModuleList()
self.convs_1x1 = nn.ModuleList()
self.norms_1 = nn.ModuleList()
self.norms_2 = nn.ModuleList()
for i in range(n_layers):
dilation = kernel_size ** i
padding = (kernel_size * dilation - dilation) // 2
self.convs_sep.append(nn.Conv1d(channels, channels, kernel_size,
groups=channels, dilation=dilation, padding=padding
))
self.convs_1x1.append(nn.Conv1d(channels, channels, 1))
self.norms_1.append(LayerNorm(channels))
self.norms_2.append(LayerNorm(channels))
def forward(self, x, x_mask, g=None):
if g is not None:
x = x + g
for i in range(self.n_layers):
y = self.convs_sep[i](x * x_mask)
y = self.norms_1[i](y)
y = F.gelu(y)
y = self.convs_1x1[i](y)
y = self.norms_2[i](y)
y = F.gelu(y)
y = self.drop(y)
x = x + y
return x * x_mask
class WN(torch.nn.Module):
def __init__(self, hidden_channels, kernel_size, dilation_rate, n_layers, gin_channels=0, p_dropout=0):
super(WN, self).__init__()
assert(kernel_size % 2 == 1)
self.hidden_channels =hidden_channels
self.kernel_size = kernel_size,
self.dilation_rate = dilation_rate
self.n_layers = n_layers
self.gin_channels = gin_channels
self.p_dropout = p_dropout
self.in_layers = torch.nn.ModuleList()
self.res_skip_layers = torch.nn.ModuleList()
self.drop = nn.Dropout(p_dropout)
if gin_channels != 0:
cond_layer = torch.nn.Conv1d(gin_channels, 2*hidden_channels*n_layers, 1)
self.cond_layer = torch.nn.utils.weight_norm(cond_layer, name='weight')
for i in range(n_layers):
dilation = dilation_rate ** i
padding = int((kernel_size * dilation - dilation) / 2)
in_layer = torch.nn.Conv1d(hidden_channels, 2*hidden_channels, kernel_size,
dilation=dilation, padding=padding)
in_layer = torch.nn.utils.weight_norm(in_layer, name='weight')
self.in_layers.append(in_layer)
# last one is not necessary
if i < n_layers - 1:
res_skip_channels = 2 * hidden_channels
else:
res_skip_channels = hidden_channels
res_skip_layer = torch.nn.Conv1d(hidden_channels, res_skip_channels, 1)
res_skip_layer = torch.nn.utils.weight_norm(res_skip_layer, name='weight')
self.res_skip_layers.append(res_skip_layer)
def forward(self, x, x_mask, g=None, **kwargs):
output = torch.zeros_like(x)
n_channels_tensor = torch.IntTensor([self.hidden_channels])
if g is not None:
g = self.cond_layer(g)
for i in range(self.n_layers):
x_in = self.in_layers[i](x)
if g is not None:
cond_offset = i * 2 * self.hidden_channels
g_l = g[:,cond_offset:cond_offset+2*self.hidden_channels,:]
else:
g_l = torch.zeros_like(x_in)
acts = commons.fused_add_tanh_sigmoid_multiply(
x_in,
g_l,
n_channels_tensor)
acts = self.drop(acts)
res_skip_acts = self.res_skip_layers[i](acts)
if i < self.n_layers - 1:
res_acts = res_skip_acts[:,:self.hidden_channels,:]
x = (x + res_acts) * x_mask
output = output + res_skip_acts[:,self.hidden_channels:,:]
else:
output = output + res_skip_acts
return output * x_mask
def remove_weight_norm(self):
if self.gin_channels != 0:
torch.nn.utils.remove_weight_norm(self.cond_layer)
for l in self.in_layers:
torch.nn.utils.remove_weight_norm(l)
for l in self.res_skip_layers:
torch.nn.utils.remove_weight_norm(l)
class ResBlock1(torch.nn.Module):
def __init__(self, channels, kernel_size=3, dilation=(1, 3, 5)):
super(ResBlock1, self).__init__()
self.convs1 = nn.ModuleList([
weight_norm(Conv1d(channels, channels, kernel_size, 1, dilation=dilation[0],
padding=get_padding(kernel_size, dilation[0]))),
weight_norm(Conv1d(channels, channels, kernel_size, 1, dilation=dilation[1],
padding=get_padding(kernel_size, dilation[1]))),
weight_norm(Conv1d(channels, channels, kernel_size, 1, dilation=dilation[2],
padding=get_padding(kernel_size, dilation[2])))
])
self.convs1.apply(init_weights)
self.convs2 = nn.ModuleList([
weight_norm(Conv1d(channels, channels, kernel_size, 1, dilation=1,
padding=get_padding(kernel_size, 1))),
weight_norm(Conv1d(channels, channels, kernel_size, 1, dilation=1,
padding=get_padding(kernel_size, 1))),
weight_norm(Conv1d(channels, channels, kernel_size, 1, dilation=1,
padding=get_padding(kernel_size, 1)))
])
self.convs2.apply(init_weights)
def forward(self, x, x_mask=None):
for c1, c2 in zip(self.convs1, self.convs2):
xt = F.leaky_relu(x, LRELU_SLOPE)
if x_mask is not None:
xt = xt * x_mask
xt = c1(xt)
xt = F.leaky_relu(xt, LRELU_SLOPE)
if x_mask is not None:
xt = xt * x_mask
xt = c2(xt)
x = xt + x
if x_mask is not None:
x = x * x_mask
return x
def remove_weight_norm(self):
for l in self.convs1:
remove_weight_norm(l)
for l in self.convs2:
remove_weight_norm(l)
class ResBlock2(torch.nn.Module):
def __init__(self, channels, kernel_size=3, dilation=(1, 3)):
super(ResBlock2, self).__init__()
self.convs = nn.ModuleList([
weight_norm(Conv1d(channels, channels, kernel_size, 1, dilation=dilation[0],
padding=get_padding(kernel_size, dilation[0]))),
weight_norm(Conv1d(channels, channels, kernel_size, 1, dilation=dilation[1],
padding=get_padding(kernel_size, dilation[1])))
])
self.convs.apply(init_weights)
def forward(self, x, x_mask=None):
for c in self.convs:
xt = F.leaky_relu(x, LRELU_SLOPE)
if x_mask is not None:
xt = xt * x_mask
xt = c(xt)
x = xt + x
if x_mask is not None:
x = x * x_mask
return x
def remove_weight_norm(self):
for l in self.convs:
remove_weight_norm(l)
class Log(nn.Module):
def forward(self, x, x_mask, reverse=False, **kwargs):
if not reverse:
y = torch.log(torch.clamp_min(x, 1e-5)) * x_mask
logdet = torch.sum(-y, [1, 2])
return y, logdet
else:
x = torch.exp(x) * x_mask
return x
class Flip(nn.Module):
def forward(self, x, *args, reverse=False, **kwargs):
x = torch.flip(x, [1])
if not reverse:
logdet = torch.zeros(x.size(0)).to(dtype=x.dtype, device=x.device)
return x, logdet
else:
return x
class ElementwiseAffine(nn.Module):
def __init__(self, channels):
super().__init__()
self.channels = channels
self.m = nn.Parameter(torch.zeros(channels,1))
self.logs = nn.Parameter(torch.zeros(channels,1))
def forward(self, x, x_mask, reverse=False, **kwargs):
if not reverse:
y = self.m + torch.exp(self.logs) * x
y = y * x_mask
logdet = torch.sum(self.logs * x_mask, [1,2])
return y, logdet
else:
x = (x - self.m) * torch.exp(-self.logs) * x_mask
return x
class ResidualCouplingLayer(nn.Module):
def __init__(self,
channels,
hidden_channels,
kernel_size,
dilation_rate,
n_layers,
p_dropout=0,
gin_channels=0,
mean_only=False):
assert channels % 2 == 0, "channels should be divisible by 2"
super().__init__()
self.channels = channels
self.hidden_channels = hidden_channels
self.kernel_size = kernel_size
self.dilation_rate = dilation_rate
self.n_layers = n_layers
self.half_channels = channels // 2
self.mean_only = mean_only
self.pre = nn.Conv1d(self.half_channels, hidden_channels, 1)
self.enc = WN(hidden_channels, kernel_size, dilation_rate, n_layers, p_dropout=p_dropout, gin_channels=gin_channels)
self.post = nn.Conv1d(hidden_channels, self.half_channels * (2 - mean_only), 1)
self.post.weight.data.zero_()
self.post.bias.data.zero_()
def forward(self, x, x_mask, g=None, reverse=False):
x0, x1 = torch.split(x, [self.half_channels]*2, 1)
h = self.pre(x0) * x_mask
h = self.enc(h, x_mask, g=g)
stats = self.post(h) * x_mask
if not self.mean_only:
m, logs = torch.split(stats, [self.half_channels]*2, 1)
else:
m = stats
logs = torch.zeros_like(m)
if not reverse:
x1 = m + x1 * torch.exp(logs) * x_mask
x = torch.cat([x0, x1], 1)
logdet = torch.sum(logs, [1,2])
return x, logdet
else:
x1 = (x1 - m) * torch.exp(-logs) * x_mask
x = torch.cat([x0, x1], 1)
return x
class ConvFlow(nn.Module):
def __init__(self, in_channels, filter_channels, kernel_size, n_layers, num_bins=10, tail_bound=5.0):
super().__init__()
self.in_channels = in_channels
self.filter_channels = filter_channels
self.kernel_size = kernel_size
self.n_layers = n_layers
self.num_bins = num_bins
self.tail_bound = tail_bound
self.half_channels = in_channels // 2
self.pre = nn.Conv1d(self.half_channels, filter_channels, 1)
self.convs = DDSConv(filter_channels, kernel_size, n_layers, p_dropout=0.)
self.proj = nn.Conv1d(filter_channels, self.half_channels * (num_bins * 3 - 1), 1)
self.proj.weight.data.zero_()
self.proj.bias.data.zero_()
def forward(self, x, x_mask, g=None, reverse=False):
x0, x1 = torch.split(x, [self.half_channels]*2, 1)
h = self.pre(x0)
h = self.convs(h, x_mask, g=g)
h = self.proj(h) * x_mask
b, c, t = x0.shape
h = h.reshape(b, c, -1, t).permute(0, 1, 3, 2) # [b, cx?, t] -> [b, c, t, ?]
unnormalized_widths = h[..., :self.num_bins] / math.sqrt(self.filter_channels)
unnormalized_heights = h[..., self.num_bins:2*self.num_bins] / math.sqrt(self.filter_channels)
unnormalized_derivatives = h[..., 2 * self.num_bins:]
x1, logabsdet = piecewise_rational_quadratic_transform(x1,
unnormalized_widths,
unnormalized_heights,
unnormalized_derivatives,
inverse=reverse,
tails='linear',
tail_bound=self.tail_bound
)
x = torch.cat([x0, x1], 1) * x_mask
logdet = torch.sum(logabsdet * x_mask, [1,2])
if not reverse:
return x, logdet
else:
return x

View File

@@ -0,0 +1,19 @@
import numpy as np
import torch
from .monotonic_align.core import maximum_path_c
def maximum_path(neg_cent, mask):
""" Cython optimized version.
neg_cent: [b, t_t, t_s]
mask: [b, t_t, t_s]
"""
device = neg_cent.device
dtype = neg_cent.dtype
neg_cent = neg_cent.data.cpu().numpy().astype(np.float32)
path = np.zeros(neg_cent.shape, dtype=np.int32)
t_t_max = mask.sum(1)[:, 0].data.cpu().numpy().astype(np.int32)
t_s_max = mask.sum(2)[:, 0].data.cpu().numpy().astype(np.int32)
maximum_path_c(path, neg_cent, t_t_max, t_s_max)
return torch.from_numpy(path).to(device=device, dtype=dtype)

42
monotonic_align/core.pyx Normal file
View File

@@ -0,0 +1,42 @@
cimport cython
from cython.parallel import prange
@cython.boundscheck(False)
@cython.wraparound(False)
cdef void maximum_path_each(int[:,::1] path, float[:,::1] value, int t_y, int t_x, float max_neg_val=-1e9) nogil:
cdef int x
cdef int y
cdef float v_prev
cdef float v_cur
cdef float tmp
cdef int index = t_x - 1
for y in range(t_y):
for x in range(max(0, t_x + y - t_y), min(t_x, y + 1)):
if x == y:
v_cur = max_neg_val
else:
v_cur = value[y-1, x]
if x == 0:
if y == 0:
v_prev = 0.
else:
v_prev = max_neg_val
else:
v_prev = value[y-1, x-1]
value[y, x] += max(v_prev, v_cur)
for y in range(t_y - 1, -1, -1):
path[y, index] = 1
if index != 0 and (index == y or value[y-1, index] < value[y-1, index-1]):
index = index - 1
@cython.boundscheck(False)
@cython.wraparound(False)
cpdef void maximum_path_c(int[:,:,::1] paths, float[:,:,::1] values, int[::1] t_ys, int[::1] t_xs) nogil:
cdef int b = paths.shape[0]
cdef int i
for i in prange(b, nogil=True):
maximum_path_each(paths[i], values[i], t_ys[i], t_xs[i])

9
monotonic_align/setup.py Normal file
View File

@@ -0,0 +1,9 @@
from distutils.core import setup
from Cython.Build import cythonize
import numpy
setup(
name = 'monotonic_align',
ext_modules = cythonize("core.pyx"),
include_dirs=[numpy.get_include()]
)

25
preprocess.py Normal file
View File

@@ -0,0 +1,25 @@
import argparse
import text
from utils import load_filepaths_and_text
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument("--out_extension", default="cleaned")
parser.add_argument("--text_index", default=1, type=int)
parser.add_argument("--filelists", nargs="+", default=["filelists/ljs_audio_text_val_filelist.txt", "filelists/ljs_audio_text_test_filelist.txt"])
parser.add_argument("--text_cleaners", nargs="+", default=["english_cleaners2"])
args = parser.parse_args()
for filelist in args.filelists:
print("START:", filelist)
filepaths_and_text = load_filepaths_and_text(filelist)
for i in range(len(filepaths_and_text)):
original_text = filepaths_and_text[i][args.text_index]
cleaned_text = text._clean_text(original_text, args.text_cleaners)
filepaths_and_text[i][args.text_index] = cleaned_text
new_filelist = filelist + "." + args.out_extension
with open(new_filelist, "w", encoding="utf-8") as f:
f.writelines(["|".join(x) + "\n" for x in filepaths_and_text])

62
preprocess_text.py Normal file
View File

@@ -0,0 +1,62 @@
import json
from random import shuffle
import tqdm
from text.cleaner import clean_text
from collections import defaultdict
stage = [1,2,3]
transcription_path = 'filelists/esd.list'
train_path = 'filelists/train.list'
val_path = 'filelists/val.list'
config_path = "configs/config.json"
val_per_spk = 2
max_val_total = 8
if 1 in stage:
with open( transcription_path+'.cleaned', 'w', encoding='utf-8') as f:
for line in tqdm.tqdm(open(transcription_path, encoding='utf-8').readlines()):
utt, spk, language, text = line.strip().split('|')
norm_text, phones, tones, word2ph = clean_text(text, language)
f.write('{}|{}|{}|{}|{}|{}|{}\n'.format(utt, spk, language, norm_text, ' '.join(phones),
" ".join([str(i) for i in tones]),
" ".join([str(i) for i in word2ph])))
if 2 in stage:
spk_utt_map = defaultdict(list)
spk_id_map = {}
current_sid = 0
with open( transcription_path+'.cleaned', encoding='utf-8') as f:
for line in f.readlines():
utt, spk, language, text, phones, tones, word2ph = line.strip().split('|')
spk_utt_map[spk].append(line)
if spk not in spk_id_map.keys():
spk_id_map[spk] = current_sid
current_sid += 1
train_list = []
val_list = []
for spk, utts in spk_utt_map.items():
shuffle(utts)
val_list+=utts[:val_per_spk]
train_list+=utts[val_per_spk:]
if len(val_list) > max_val_total:
train_list+=val_list[max_val_total:]
val_list = val_list[:max_val_total]
with open( train_path,"w", encoding='utf-8') as f:
for line in train_list:
f.write(line)
with open(val_path, "w", encoding='utf-8') as f:
for line in val_list:
f.write(line)
if 3 in stage:
assert 2 in stage
config = json.load(open(config_path))
config["data"]['spk2id'] = spk_id_map
with open(config_path, 'w', encoding='utf-8') as f:
json.dump(config, f, indent=2)

11
requirements.txt Normal file
View File

@@ -0,0 +1,11 @@
Cython==0.29.21
librosa==0.8.0
matplotlib==3.3.1
numpy==1.18.5
phonemizer==2.2.1
scipy==1.5.2
tensorboard==2.3.0
torch==1.6.0
torchvision==0.7.0
Unidecode==1.1.1
amfm_decompy

42
resample.py Normal file
View File

@@ -0,0 +1,42 @@
import os
import argparse
import librosa
import numpy as np
from multiprocessing import Pool, cpu_count
import soundfile
from scipy.io import wavfile
from tqdm import tqdm
def process(item):
spkdir, wav_name, args = item
# speaker 's5', 'p280', 'p315' are excluded,
speaker = spkdir.replace("\\", "/").split("/")[-1]
wav_path = os.path.join(args.in_dir, speaker, wav_name)
if os.path.exists(wav_path) and '.wav' in wav_path:
os.makedirs(os.path.join(args.out_dir2, speaker), exist_ok=True)
wav, sr = librosa.load(wav_path, sr=args.sr2)
soundfile.write(
os.path.join(args.out_dir2, speaker, wav_name),
wav,
sr
)
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("--sr2", type=int, default=22050, help="sampling rate")
parser.add_argument("--in_dir", type=str, default="./raw", help="path to source dir")
parser.add_argument("--out_dir2", type=str, default="./dataset", help="path to target dir")
args = parser.parse_args()
processs = 8
pool = Pool(processes=processs)
for speaker in os.listdir(args.in_dir):
spk_dir = os.path.join(args.in_dir, speaker)
if os.path.isdir(spk_dir):
print(spk_dir)
for _ in tqdm(pool.imap_unordered(process, [(spk_dir, i, args) for i in os.listdir(spk_dir) if i.endswith("wav")])):
pass

26
text/__init__.py Normal file
View File

@@ -0,0 +1,26 @@
from text.symbols import *
_symbol_to_id = {s: i for i, s in enumerate(symbols)}
def cleaned_text_to_sequence(cleaned_text, tones, language):
'''Converts a string of text to a sequence of IDs corresponding to the symbols in the text.
Args:
text: string to convert to a sequence
Returns:
List of integers corresponding to the symbols in the text
'''
phones = [_symbol_to_id[symbol] for symbol in cleaned_text]
tone_start = language_tone_start_map[language]
tones = [i + tone_start for i in tones]
lang_id = language_id_map[language]
lang_ids = [lang_id for i in phones]
return phones, tones, lang_ids
def get_bert(norm_text, word2ph, language):
from chinese_bert import get_bert_feature as zh_bert
lang_bert_func_map = {
'ZH': zh_bert
}
bert = lang_bert_func_map[language](norm_text, word2ph)
return bert

193
text/chinese.py Normal file
View File

@@ -0,0 +1,193 @@
import os
import re
import cn2an
from pypinyin import lazy_pinyin, Style
from text import symbols
from text.symbols import punctuation
from text.tone_sandhi import ToneSandhi
current_file_path = os.path.dirname(__file__)
pinyin_to_symbol_map = {line.split("\t")[0]: line.strip().split("\t")[1] for line in
open(os.path.join(current_file_path, 'opencpop-strict.txt')).readlines()}
import jieba.posseg as psg
rep_map = {
'': ',',
'': ',',
'': ',',
'': '.',
'': '!',
'': '?',
'\n': '.',
"·": ",",
'': ",",
'...': '',
'$': '.',
'': "'",
'': "'",
'': "'",
'': "'",
'': "'",
'': "'",
'(': "'",
')': "'",
'': "'",
'': "'",
'': "'",
'': "'",
'[': "'",
']': "'",
'': "-",
'': "-",
'~': "-",
'': "'",
'': "'",
}
tone_modifier = ToneSandhi()
def replace_punctuation(text):
text = text.replace("", "").replace("","")
pattern = re.compile('|'.join(re.escape(p) for p in rep_map.keys()))
replaced_text = pattern.sub(lambda x: rep_map[x.group()], text)
replaced_text = re.sub(r'[^\u4e00-\u9fa5'+"".join(punctuation)+r']+', '', replaced_text)
return replaced_text
def g2p(text):
pattern = r'(?<=[{0}])\s*'.format(''.join(punctuation))
sentences = [i for i in re.split(pattern, text) if i.strip()!='']
phones, tones, word2ph = _g2p(sentences)
assert sum(word2ph) == len(phones)
assert len(word2ph) == len(text)
phones = ['_'] + phones + ["_"]
tones = [0] + tones + [0]
word2ph = [1] + word2ph + [1]
return phones, tones, word2ph
def _get_initials_finals(word):
initials = []
finals = []
orig_initials = lazy_pinyin(
word, neutral_tone_with_five=True, style=Style.INITIALS)
orig_finals = lazy_pinyin(
word, neutral_tone_with_five=True, style=Style.FINALS_TONE3)
for c, v in zip(orig_initials, orig_finals):
initials.append(c)
finals.append(v)
return initials, finals
def _g2p(segments):
phones_list = []
tones_list = []
word2ph = []
for seg in segments:
pinyins = []
# Replace all English words in the sentence
seg = re.sub('[a-zA-Z]+', '', seg)
seg_cut = psg.lcut(seg)
initials = []
finals = []
seg_cut = tone_modifier.pre_merge_for_modify(seg_cut)
for word, pos in seg_cut:
if pos == 'eng':
continue
sub_initials, sub_finals = _get_initials_finals(word)
sub_finals = tone_modifier.modified_tone(word, pos,
sub_finals)
initials.append(sub_initials)
finals.append(sub_finals)
# assert len(sub_initials) == len(sub_finals) == len(word)
initials = sum(initials, [])
finals = sum(finals, [])
#
for c, v in zip(initials, finals):
raw_pinyin = c+v
# NOTE: post process for pypinyin outputs
# we discriminate i, ii and iii
if c == v:
assert c in punctuation
phone = [c]
tone = '0'
word2ph.append(1)
else:
v_without_tone = v[:-1]
tone = v[-1]
pinyin = c+v_without_tone
assert tone in '12345'
if c:
# 多音节
v_rep_map = {
"uei": 'ui',
'iou': 'iu',
'uen': 'un',
}
if v_without_tone in v_rep_map.keys():
pinyin = c+v_rep_map[v_without_tone]
else:
# 单音节
pinyin_rep_map = {
'ing': 'ying',
'i': 'yi',
'in': 'yin',
'u': 'wu',
}
if pinyin in pinyin_rep_map.keys():
pinyin = pinyin_rep_map[pinyin]
else:
single_rep_map = {
'v': 'yu',
'e': 'e',
'i': 'y',
'u': 'w',
}
if pinyin[0] in single_rep_map.keys():
pinyin = single_rep_map[pinyin[0]]+pinyin[1:]
assert pinyin in pinyin_to_symbol_map.keys(), (pinyin, seg, raw_pinyin)
phone = pinyin_to_symbol_map[pinyin].split(' ')
word2ph.append(len(phone))
phones_list += phone
tones_list += [int(tone)] * len(phone)
return phones_list, tones_list, word2ph
def text_normalize(text):
numbers = re.findall(r'\d+(?:\.?\d+)?', text)
for number in numbers:
text = text.replace(number, cn2an.an2cn(number), 1)
text = replace_punctuation(text)
return text
def get_bert_feature(text, word2ph):
from text import chinese_bert
return chinese_bert.get_bert_feature(text, word2ph)
if __name__ == '__main__':
from text.chinese_bert import get_bert_feature
text = "啊!但是《原神》是由,米哈\游自主, [研发]的一款全.新开放世界.冒险游戏"
text = text_normalize(text)
print(text)
phones, tones, word2ph = g2p(text)
bert = get_bert_feature(text, word2ph)
print(phones, tones, word2ph, bert.shape)
# # 示例用法
# text = "这是一个示例文本:,你好!这是一个测试...."
# print(g2p_paddle(text)) # 输出: 这是一个示例文本你好这是一个测试

55
text/chinese_bert.py Normal file
View File

@@ -0,0 +1,55 @@
import torch
from transformers import AutoTokenizer, AutoModelForMaskedLM
import os
os.environ['ALL_PROXY']='socks5://127.0.0.1:7890'
os.environ['HTTPS_PROXY']='http://127.0.0.1:7890'
os.environ['HTTP_PROXY']='http://127.0.0.1:7890'
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
tokenizer = AutoTokenizer.from_pretrained("hfl/chinese-roberta-wwm-ext-large")
model = AutoModelForMaskedLM.from_pretrained("hfl/chinese-roberta-wwm-ext-large").to(device)
def get_bert_feature(text, word2ph):
with torch.no_grad():
inputs = tokenizer(text, return_tensors='pt')
for i in inputs:
inputs[i] = inputs[i].to(device)
res = model(**inputs, output_hidden_states=True)
res = torch.cat(res['hidden_states'][-3:-2], -1)[0].cpu()
assert len(word2ph) == len(text)+2
word2phone = word2ph
phone_level_feature = []
for i in range(len(word2phone)):
repeat_feature = res[i].repeat(word2phone[i], 1)
phone_level_feature.append(repeat_feature)
phone_level_feature = torch.cat(phone_level_feature, dim=0)
return phone_level_feature.T
if __name__ == '__main__':
# feature = get_bert_feature('你好,我是说的道理。')
import torch
word_level_feature = torch.rand(38, 1024) # 12个词,每个词1024维特征
word2phone = [1, 2, 1, 2, 2, 1, 2, 2, 1, 2, 2, 1, 2, 2, 2, 2, 2, 1, 1, 2, 2, 1, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 1]
# 计算总帧数
total_frames = sum(word2phone)
print(word_level_feature.shape)
print(word2phone)
phone_level_feature = []
for i in range(len(word2phone)):
print(word_level_feature[i].shape)
# 对每个词重复word2phone[i]次
repeat_feature = word_level_feature[i].repeat(word2phone[i], 1)
phone_level_feature.append(repeat_feature)
phone_level_feature = torch.cat(phone_level_feature, dim=0)
print(phone_level_feature.shape) # torch.Size([36, 1024])

32
text/cleaner.py Normal file
View File

@@ -0,0 +1,32 @@
from text import chinese, japanese, english, cleaned_text_to_sequence
language_module_map = {
'ZH': chinese,
"JA": japanese,
"EN": english
}
def clean_text(text, language):
language_module = language_module_map[language]
norm_text = language_module.text_normalize(text)
phones, tones, word2ph = language_module.g2p(norm_text)
return norm_text, phones, tones, word2ph
def clean_text_bert(text, language):
language_module = language_module_map[language]
norm_text = language_module.text_normalize(text)
phones, tones, word2ph = language_module.g2p(norm_text)
bert = language_module.get_bert_feature(norm_text, word2ph)
return phones, tones, bert
def text_to_sequence(text, language):
_, _, phones, tones = clean_text(text, language)
return cleaned_text_to_sequence(phones, tones, language)
if __name__ == '__main__':
print(text_to_sequence("你好,啊啊啊额、还是到付红四方。", 'ZH'))
print(text_to_sequence("hello", 'EN'))

129530
text/cmudict.rep Normal file

File diff suppressed because it is too large Load Diff

BIN
text/cmudict_cache.pickle Normal file

Binary file not shown.

138
text/english.py Normal file
View File

@@ -0,0 +1,138 @@
import pickle
import os
import re
from g2p_en import G2p
from string import punctuation
from text import symbols
current_file_path = os.path.dirname(__file__)
CMU_DICT_PATH = os.path.join(current_file_path, 'cmudict.rep')
CACHE_PATH = os.path.join(current_file_path, 'cmudict_cache.pickle')
_g2p = G2p()
arpa = {'AH0', 'S', 'AH1', 'EY2', 'AE2', 'EH0', 'OW2', 'UH0', 'NG', 'B', 'G', 'AY0', 'M', 'AA0', 'F', 'AO0', 'ER2', 'UH1', 'IY1', 'AH2', 'DH', 'IY0', 'EY1', 'IH0', 'K', 'N', 'W', 'IY2', 'T', 'AA1', 'ER1', 'EH2', 'OY0', 'UH2', 'UW1', 'Z', 'AW2', 'AW1', 'V', 'UW2', 'AA2', 'ER', 'AW0', 'UW0', 'R', 'OW1', 'EH1', 'ZH', 'AE0', 'IH2', 'IH', 'Y', 'JH', 'P', 'AY1', 'EY0', 'OY2', 'TH', 'HH', 'D', 'ER0', 'CH', 'AO1', 'AE1', 'AO2', 'OY1', 'AY2', 'IH1', 'OW0', 'L', 'SH'}
def post_replace_ph(ph):
rep_map = {
'': ',',
'': ',',
'': ',',
'': '.',
'': '!',
'': '?',
'\n': '.',
"·": ",",
'': ",",
'...': '',
'v': "V"
}
if ph in rep_map.keys():
ph = rep_map[ph]
if ph in symbols:
return ph
if ph not in symbols:
ph = 'UNK'
return ph
def read_dict():
g2p_dict = {}
start_line = 49
with open(CMU_DICT_PATH) as f:
line = f.readline()
line_index = 1
while line:
if line_index >= start_line:
line = line.strip()
word_split = line.split(' ')
word = word_split[0]
syllable_split = word_split[1].split(' - ')
g2p_dict[word] = []
for syllable in syllable_split:
phone_split = syllable.split(' ')
g2p_dict[word].append(phone_split)
line_index = line_index + 1
line = f.readline()
return g2p_dict
def cache_dict(g2p_dict, file_path):
with open(file_path, 'wb') as pickle_file:
pickle.dump(g2p_dict, pickle_file)
def get_dict():
if os.path.exists(CACHE_PATH):
with open(CACHE_PATH, 'rb') as pickle_file:
g2p_dict = pickle.load(pickle_file)
else:
g2p_dict = read_dict()
cache_dict(g2p_dict, CACHE_PATH)
return g2p_dict
eng_dict = get_dict()
def refine_ph(phn):
tone = 0
if re.search(r'\d$', phn):
tone = int(phn[-1]) + 1
phn = phn[:-1]
return phn.lower(), tone
def refine_syllables(syllables):
tones = []
phonemes = []
for phn_list in syllables:
for i in range(len(phn_list)):
phn = phn_list[i]
phn, tone = refine_ph(phn)
phonemes.append(phn)
tones.append(tone)
return phonemes, tones
def text_normalize(text):
# todo: eng text normalize
return text
def g2p(text):
phones = []
tones = []
words = re.split(r"([,;.\-\?\!\s+])", text)
for w in words:
if w.upper() in eng_dict:
phns, tns = refine_syllables(eng_dict[w.upper()])
phones += phns
tones += tns
else:
phone_list = list(filter(lambda p: p != " ", _g2p(w)))
for ph in phone_list:
if ph in arpa:
ph, tn = refine_ph(ph)
phones.append(ph)
tones.append(tn)
else:
phones.append(ph)
tones.append(0)
# todo: implement word2ph
word2ph = [1 for i in phones]
phones = [post_replace_ph(i) for i in phones]
return phones, tones, word2ph
if __name__ == "__main__":
# print(get_dict())
# print(eng_word_to_phoneme("hello"))
print(g2p("In this paper, we propose 1 DSPGAN, a GAN-based universal vocoder."))
# all_phones = set()
# for k, syllables in eng_dict.items():
# for group in syllables:
# for ph in group:
# all_phones.add(ph)
# print(all_phones)

104
text/japanese.py Normal file
View File

@@ -0,0 +1,104 @@
# modified from https://github.com/CjangCjengh/vits/blob/main/text/japanese.py
import re
import sys
import pyopenjtalk
from text import symbols
# Regular expression matching Japanese without punctuation marks:
_japanese_characters = re.compile(
r'[A-Za-z\d\u3005\u3040-\u30ff\u4e00-\u9fff\uff11-\uff19\uff21-\uff3a\uff41-\uff5a\uff66-\uff9d]')
# Regular expression matching non-Japanese characters or punctuation marks:
_japanese_marks = re.compile(
r'[^A-Za-z\d\u3005\u3040-\u30ff\u4e00-\u9fff\uff11-\uff19\uff21-\uff3a\uff41-\uff5a\uff66-\uff9d]')
# List of (symbol, Japanese) pairs for marks:
_symbols_to_japanese = [(re.compile('%s' % x[0]), x[1]) for x in [
('', 'パーセント')
]]
# List of (consonant, sokuon) pairs:
_real_sokuon = [(re.compile('%s' % x[0]), x[1]) for x in [
(r'Q([↑↓]*[kg])', r'k#\1'),
(r'Q([↑↓]*[tdjʧ])', r't#\1'),
(r'Q([↑↓]*[sʃ])', r's\1'),
(r'Q([↑↓]*[pb])', r'p#\1')
]]
# List of (consonant, hatsuon) pairs:
_real_hatsuon = [(re.compile('%s' % x[0]), x[1]) for x in [
(r'N([↑↓]*[pbm])', r'm\1'),
(r'N([↑↓]*[ʧʥj])', r'n^\1'),
(r'N([↑↓]*[tdn])', r'n\1'),
(r'N([↑↓]*[kg])', r'ŋ\1')
]]
def post_replace_ph(ph):
rep_map = {
'': ',',
'': ',',
'': ',',
'': '.',
'': '!',
'': '?',
'\n': '.',
"·": ",",
'': ",",
'...': '',
'v': "V"
}
if ph in rep_map.keys():
ph = rep_map[ph]
if ph in symbols:
return ph
if ph not in symbols:
ph = 'UNK'
return ph
def symbols_to_japanese(text):
for regex, replacement in _symbols_to_japanese:
text = re.sub(regex, replacement, text)
return text
def preprocess_jap(text):
'''Reference https://r9y9.github.io/ttslearn/latest/notebooks/ch10_Recipe-Tacotron.html'''
text = symbols_to_japanese(text)
sentences = re.split(_japanese_marks, text)
marks = re.findall(_japanese_marks, text)
text = []
for i, sentence in enumerate(sentences):
if re.match(_japanese_characters, sentence):
p = pyopenjtalk.g2p(sentence)
text += p.split(" ")
if i < len(marks):
text += [marks[i].replace(' ', '')]
return text
def text_normalize(text):
# todo: jap text normalize
return text
def g2p(norm_text):
phones = preprocess_jap(norm_text)
phones = [post_replace_ph(i) for i in phones]
# todo: implement tones and word2ph
tones = [0 for i in phones]
word2ph = [1 for i in phones]
return phones, tones, word2ph
if __name__ == '__main__':
for line in open("../../../Downloads/transcript_utf8.txt").readlines():
text = line.split(":")[1]
phones, tones, word2ph = g2p(text)
for p in phones:
if p == "z":
print(text, phones)
sys.exit(0)

429
text/opencpop-strict.txt Normal file
View File

@@ -0,0 +1,429 @@
a AA a
ai AA ai
an AA an
ang AA ang
ao AA ao
ba b a
bai b ai
ban b an
bang b ang
bao b ao
bei b ei
ben b en
beng b eng
bi b i
bian b ian
biao b iao
bie b ie
bin b in
bing b ing
bo b o
bu b u
ca c a
cai c ai
can c an
cang c ang
cao c ao
ce c e
cei c ei
cen c en
ceng c eng
cha ch a
chai ch ai
chan ch an
chang ch ang
chao ch ao
che ch e
chen ch en
cheng ch eng
chi ch ir
chong ch ong
chou ch ou
chu ch u
chua ch ua
chuai ch uai
chuan ch uan
chuang ch uang
chui ch ui
chun ch un
chuo ch uo
ci c i0
cong c ong
cou c ou
cu c u
cuan c uan
cui c ui
cun c un
cuo c uo
da d a
dai d ai
dan d an
dang d ang
dao d ao
de d e
dei d ei
den d en
deng d eng
di d i
dia d ia
dian d ian
diao d iao
die d ie
ding d ing
diu d iu
dong d ong
dou d ou
du d u
duan d uan
dui d ui
dun d un
duo d uo
e EE e
ei EE ei
en EE en
eng EE eng
er EE er
fa f a
fan f an
fang f ang
fei f ei
fen f en
feng f eng
fo f o
fou f ou
fu f u
ga g a
gai g ai
gan g an
gang g ang
gao g ao
ge g e
gei g ei
gen g en
geng g eng
gong g ong
gou g ou
gu g u
gua g ua
guai g uai
guan g uan
guang g uang
gui g ui
gun g un
guo g uo
ha h a
hai h ai
han h an
hang h ang
hao h ao
he h e
hei h ei
hen h en
heng h eng
hong h ong
hou h ou
hu h u
hua h ua
huai h uai
huan h uan
huang h uang
hui h ui
hun h un
huo h uo
ji j i
jia j ia
jian j ian
jiang j iang
jiao j iao
jie j ie
jin j in
jing j ing
jiong j iong
jiu j iu
ju j v
jv j v
juan j van
jvan j van
jue j ve
jve j ve
jun j vn
jvn j vn
ka k a
kai k ai
kan k an
kang k ang
kao k ao
ke k e
kei k ei
ken k en
keng k eng
kong k ong
kou k ou
ku k u
kua k ua
kuai k uai
kuan k uan
kuang k uang
kui k ui
kun k un
kuo k uo
la l a
lai l ai
lan l an
lang l ang
lao l ao
le l e
lei l ei
leng l eng
li l i
lia l ia
lian l ian
liang l iang
liao l iao
lie l ie
lin l in
ling l ing
liu l iu
lo l o
long l ong
lou l ou
lu l u
luan l uan
lun l un
luo l uo
lv l v
lve l ve
ma m a
mai m ai
man m an
mang m ang
mao m ao
me m e
mei m ei
men m en
meng m eng
mi m i
mian m ian
miao m iao
mie m ie
min m in
ming m ing
miu m iu
mo m o
mou m ou
mu m u
na n a
nai n ai
nan n an
nang n ang
nao n ao
ne n e
nei n ei
nen n en
neng n eng
ni n i
nian n ian
niang n iang
niao n iao
nie n ie
nin n in
ning n ing
niu n iu
nong n ong
nou n ou
nu n u
nuan n uan
nun n un
nuo n uo
nv n v
nve n ve
o OO o
ou OO ou
pa p a
pai p ai
pan p an
pang p ang
pao p ao
pei p ei
pen p en
peng p eng
pi p i
pian p ian
piao p iao
pie p ie
pin p in
ping p ing
po p o
pou p ou
pu p u
qi q i
qia q ia
qian q ian
qiang q iang
qiao q iao
qie q ie
qin q in
qing q ing
qiong q iong
qiu q iu
qu q v
qv q v
quan q van
qvan q van
que q ve
qve q ve
qun q vn
qvn q vn
ran r an
rang r ang
rao r ao
re r e
ren r en
reng r eng
ri r ir
rong r ong
rou r ou
ru r u
rua r ua
ruan r uan
rui r ui
run r un
ruo r uo
sa s a
sai s ai
san s an
sang s ang
sao s ao
se s e
sen s en
seng s eng
sha sh a
shai sh ai
shan sh an
shang sh ang
shao sh ao
she sh e
shei sh ei
shen sh en
sheng sh eng
shi sh ir
shou sh ou
shu sh u
shua sh ua
shuai sh uai
shuan sh uan
shuang sh uang
shui sh ui
shun sh un
shuo sh uo
si s i0
song s ong
sou s ou
su s u
suan s uan
sui s ui
sun s un
suo s uo
ta t a
tai t ai
tan t an
tang t ang
tao t ao
te t e
tei t ei
teng t eng
ti t i
tian t ian
tiao t iao
tie t ie
ting t ing
tong t ong
tou t ou
tu t u
tuan t uan
tui t ui
tun t un
tuo t uo
wa w a
wai w ai
wan w an
wang w ang
wei w ei
wen w en
weng w eng
wo w o
wu w u
xi x i
xia x ia
xian x ian
xiang x iang
xiao x iao
xie x ie
xin x in
xing x ing
xiong x iong
xiu x iu
xu x v
xv x v
xuan x van
xvan x van
xue x ve
xve x ve
xun x vn
xvn x vn
ya y a
yan y En
yang y ang
yao y ao
ye y E
yi y i
yin y in
ying y ing
yo y o
yong y ong
you y ou
yu y v
yv y v
yuan y van
yvan y van
yue y ve
yve y ve
yun y vn
yvn y vn
za z a
zai z ai
zan z an
zang z ang
zao z ao
ze z e
zei z ei
zen z en
zeng z eng
zha zh a
zhai zh ai
zhan zh an
zhang zh ang
zhao zh ao
zhe zh e
zhei zh ei
zhen zh en
zheng zh eng
zhi zh ir
zhong zh ong
zhou zh ou
zhu zh u
zhua zh ua
zhuai zh uai
zhuan zh uan
zhuang zh uang
zhui zh ui
zhun zh un
zhuo zh uo
zi z i0
zong z ong
zou z ou
zu z u
zuan z uan
zui z ui
zun z un
zuo z uo

51
text/symbols.py Normal file
View File

@@ -0,0 +1,51 @@
punctuation = ['!', '?', '', ",", ".", "'", '-']
pu_symbols = punctuation + ["SP", "UNK"]
pad = '_'
# chinese
zh_symbols = ['E', 'En', 'a', 'ai', 'an', 'ang', 'ao', 'b', 'c', 'ch', 'd', 'e', 'ei', 'en', 'eng', 'er', 'f', 'g', 'h',
'i', 'i0', 'ia', 'ian', 'iang', 'iao', 'ie', 'in', 'ing', 'iong', 'ir', 'iu', 'j', 'k', 'l', 'm', 'n', 'o',
'ong',
'ou', 'p', 'q', 'r', 's', 'sh', 't', 'u', 'ua', 'uai', 'uan', 'uang', 'ui', 'un', 'uo', 'v', 'van', 've', 'vn',
'w', 'x', 'y', 'z', 'zh',
"AA", "EE", "OO"]
num_zh_tones = 6
# japanese
ja_symbols = ['I', 'N', 'U', 'a', 'b', 'by', 'ch', 'cl', 'd', 'dy', 'e', 'f', 'g', 'gy', 'h', 'hy', 'i', 'j', 'k', 'ky',
'm', 'my', 'n', 'ny', 'o', 'p', 'py', 'r', 'ry', 's', 'sh', 't', 'ts', 'u', 'V', 'w', 'y', 'z']
num_ja_tones = 1
# English
en_symbols = ['aa', 'ae', 'ah', 'ao', 'aw', 'ay', 'b', 'ch', 'd', 'dh', 'eh', 'er', 'ey', 'f', 'g', 'hh', 'ih', 'iy',
'jh', 'k', 'l', 'm', 'n', 'ng', 'ow', 'oy', 'p', 'r', 's',
'sh', 't', 'th', 'uh', 'uw', 'V', 'w', 'y', 'z', 'zh']
num_en_tones = 4
# combine all symbols
normal_symbols = sorted(set(zh_symbols + ja_symbols + en_symbols))
symbols = [pad] + normal_symbols + pu_symbols
sil_phonemes_ids = [symbols.index(i) for i in pu_symbols]
# combine all tones
num_tones = num_zh_tones + num_ja_tones + num_en_tones
# language maps
language_id_map = {
'ZH': 0,
"JA": 1,
"EN": 2
}
num_languages = len(language_id_map.keys())
language_tone_start_map = {
'ZH': 0,
"JA": num_zh_tones,
"EN": num_zh_tones + num_ja_tones
}
if __name__ == '__main__':
a = set(zh_symbols)
b = set(en_symbols)
print(sorted(a&b))

351
text/tone_sandhi.py Normal file
View File

@@ -0,0 +1,351 @@
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from typing import List
from typing import Tuple
import jieba
from pypinyin import lazy_pinyin
from pypinyin import Style
class ToneSandhi():
def __init__(self):
self.must_neural_tone_words = {
'麻烦', '麻利', '鸳鸯', '高粱', '骨头', '骆驼', '马虎', '首饰', '馒头', '馄饨', '风筝',
'难为', '队伍', '阔气', '闺女', '门道', '锄头', '铺盖', '铃铛', '铁匠', '钥匙', '里脊',
'里头', '部分', '那么', '道士', '造化', '迷糊', '连累', '这么', '这个', '运气', '过去',
'软和', '转悠', '踏实', '跳蚤', '跟头', '趔趄', '财主', '豆腐', '讲究', '记性', '记号',
'认识', '规矩', '见识', '裁缝', '补丁', '衣裳', '衣服', '衙门', '街坊', '行李', '行当',
'蛤蟆', '蘑菇', '薄荷', '葫芦', '葡萄', '萝卜', '荸荠', '苗条', '苗头', '苍蝇', '芝麻',
'舒服', '舒坦', '舌头', '自在', '膏药', '脾气', '脑袋', '脊梁', '能耐', '胳膊', '胭脂',
'胡萝', '胡琴', '胡同', '聪明', '耽误', '耽搁', '耷拉', '耳朵', '老爷', '老实', '老婆',
'老头', '老太', '翻腾', '罗嗦', '罐头', '编辑', '结实', '红火', '累赘', '糨糊', '糊涂',
'精神', '粮食', '簸箕', '篱笆', '算计', '算盘', '答应', '笤帚', '笑语', '笑话', '窟窿',
'窝囊', '窗户', '稳当', '稀罕', '称呼', '秧歌', '秀气', '秀才', '福气', '祖宗', '砚台',
'码头', '石榴', '石头', '石匠', '知识', '眼睛', '眯缝', '眨巴', '眉毛', '相声', '盘算',
'白净', '痢疾', '痛快', '疟疾', '疙瘩', '疏忽', '畜生', '生意', '甘蔗', '琵琶', '琢磨',
'琉璃', '玻璃', '玫瑰', '玄乎', '狐狸', '状元', '特务', '牲口', '牙碜', '牌楼', '爽快',
'爱人', '热闹', '烧饼', '烟筒', '烂糊', '点心', '炊帚', '灯笼', '火候', '漂亮', '滑溜',
'溜达', '温和', '清楚', '消息', '浪头', '活泼', '比方', '正经', '欺负', '模糊', '槟榔',
'棺材', '棒槌', '棉花', '核桃', '栅栏', '柴火', '架势', '枕头', '枇杷', '机灵', '本事',
'木头', '木匠', '朋友', '月饼', '月亮', '暖和', '明白', '时候', '新鲜', '故事', '收拾',
'收成', '提防', '挖苦', '挑剔', '指甲', '指头', '拾掇', '拳头', '拨弄', '招牌', '招呼',
'抬举', '护士', '折腾', '扫帚', '打量', '打算', '打点', '打扮', '打听', '打发', '扎实',
'扁担', '戒指', '懒得', '意识', '意思', '情形', '悟性', '怪物', '思量', '怎么', '念头',
'念叨', '快活', '忙活', '志气', '心思', '得罪', '张罗', '弟兄', '开通', '应酬', '庄稼',
'干事', '帮手', '帐篷', '希罕', '师父', '师傅', '巴结', '巴掌', '差事', '工夫', '岁数',
'屁股', '尾巴', '少爷', '小气', '小伙', '将就', '对头', '对付', '寡妇', '家伙', '客气',
'实在', '官司', '学问', '学生', '字号', '嫁妆', '媳妇', '媒人', '婆家', '娘家', '委屈',
'姑娘', '姐夫', '妯娌', '妥当', '妖精', '奴才', '女婿', '头发', '太阳', '大爷', '大方',
'大意', '大夫', '多少', '多么', '外甥', '壮实', '地道', '地方', '在乎', '困难', '嘴巴',
'嘱咐', '嘟囔', '嘀咕', '喜欢', '喇嘛', '喇叭', '商量', '唾沫', '哑巴', '哈欠', '哆嗦',
'咳嗽', '和尚', '告诉', '告示', '含糊', '吓唬', '后头', '名字', '名堂', '合同', '吆喝',
'叫唤', '口袋', '厚道', '厉害', '千斤', '包袱', '包涵', '匀称', '勤快', '动静', '动弹',
'功夫', '力气', '前头', '刺猬', '刺激', '别扭', '利落', '利索', '利害', '分析', '出息',
'凑合', '凉快', '冷战', '冤枉', '冒失', '养活', '关系', '先生', '兄弟', '便宜', '使唤',
'佩服', '作坊', '体面', '位置', '似的', '伙计', '休息', '什么', '人家', '亲戚', '亲家',
'交情', '云彩', '事情', '买卖', '主意', '丫头', '丧气', '两口', '东西', '东家', '世故',
'不由', '不在', '下水', '下巴', '上头', '上司', '丈夫', '丈人', '一辈', '那个', '菩萨',
'父亲', '母亲', '咕噜', '邋遢', '费用', '冤家', '甜头', '介绍', '荒唐', '大人', '泥鳅',
'幸福', '熟悉', '计划', '扑腾', '蜡烛', '姥爷', '照顾', '喉咙', '吉他', '弄堂', '蚂蚱',
'凤凰', '拖沓', '寒碜', '糟蹋', '倒腾', '报复', '逻辑', '盘缠', '喽啰', '牢骚', '咖喱',
'扫把', '惦记'
}
self.must_not_neural_tone_words = {
"男子", "女子", "分子", "原子", "量子", "莲子", "石子", "瓜子", "电子", "人人", "虎虎"
}
self.punc = ":,;。?!“”‘’':,;.?!"
# the meaning of jieba pos tag: https://blog.csdn.net/weixin_44174352/article/details/113731041
# e.g.
# word: "家里"
# pos: "s"
# finals: ['ia1', 'i3']
def _neural_sandhi(self, word: str, pos: str,
finals: List[str]) -> List[str]:
# reduplication words for n. and v. e.g. 奶奶, 试试, 旺旺
for j, item in enumerate(word):
if j - 1 >= 0 and item == word[j - 1] and pos[0] in {
"n", "v", "a"
} and word not in self.must_not_neural_tone_words:
finals[j] = finals[j][:-1] + "5"
ge_idx = word.find("")
if len(word) >= 1 and word[-1] in "吧呢哈啊呐噻嘛吖嗨呐哦哒额滴哩哟喽啰耶喔诶":
finals[-1] = finals[-1][:-1] + "5"
elif len(word) >= 1 and word[-1] in "的地得":
finals[-1] = finals[-1][:-1] + "5"
# e.g. 走了, 看着, 去过
elif len(word) == 1 and word in "了着过" and pos in {"ul", "uz", "ug"}:
finals[-1] = finals[-1][:-1] + "5"
elif len(word) > 1 and word[-1] in "们子" and pos in {
"r", "n"
} and word not in self.must_not_neural_tone_words:
finals[-1] = finals[-1][:-1] + "5"
# e.g. 桌上, 地下, 家里
elif len(word) > 1 and word[-1] in "上下里" and pos in {"s", "l", "f"}:
finals[-1] = finals[-1][:-1] + "5"
# e.g. 上来, 下去
elif len(word) > 1 and word[-1] in "来去" and word[-2] in "上下进出回过起开":
finals[-1] = finals[-1][:-1] + "5"
# 个做量词
elif (ge_idx >= 1 and
(word[ge_idx - 1].isnumeric() or
word[ge_idx - 1] in "几有两半多各整每做是")) or word == '':
finals[ge_idx] = finals[ge_idx][:-1] + "5"
else:
if word in self.must_neural_tone_words or word[
-2:] in self.must_neural_tone_words:
finals[-1] = finals[-1][:-1] + "5"
word_list = self._split_word(word)
finals_list = [finals[:len(word_list[0])], finals[len(word_list[0]):]]
for i, word in enumerate(word_list):
# conventional neural in Chinese
if word in self.must_neural_tone_words or word[
-2:] in self.must_neural_tone_words:
finals_list[i][-1] = finals_list[i][-1][:-1] + "5"
finals = sum(finals_list, [])
return finals
def _bu_sandhi(self, word: str, finals: List[str]) -> List[str]:
# e.g. 看不懂
if len(word) == 3 and word[1] == "":
finals[1] = finals[1][:-1] + "5"
else:
for i, char in enumerate(word):
# "不" before tone4 should be bu2, e.g. 不怕
if char == "" and i + 1 < len(word) and finals[i +
1][-1] == "4":
finals[i] = finals[i][:-1] + "2"
return finals
def _yi_sandhi(self, word: str, finals: List[str]) -> List[str]:
# "一" in number sequences, e.g. 一零零, 二一零
if word.find("") != -1 and all(
[item.isnumeric() for item in word if item != ""]):
return finals
# "一" between reduplication words shold be yi5, e.g. 看一看
elif len(word) == 3 and word[1] == "" and word[0] == word[-1]:
finals[1] = finals[1][:-1] + "5"
# when "一" is ordinal word, it should be yi1
elif word.startswith("第一"):
finals[1] = finals[1][:-1] + "1"
else:
for i, char in enumerate(word):
if char == "" and i + 1 < len(word):
# "一" before tone4 should be yi2, e.g. 一段
if finals[i + 1][-1] == "4":
finals[i] = finals[i][:-1] + "2"
# "一" before non-tone4 should be yi4, e.g. 一天
else:
# "一" 后面如果是标点,还读一声
if word[i + 1] not in self.punc:
finals[i] = finals[i][:-1] + "4"
return finals
def _split_word(self, word: str) -> List[str]:
word_list = jieba.cut_for_search(word)
word_list = sorted(word_list, key=lambda i: len(i), reverse=False)
first_subword = word_list[0]
first_begin_idx = word.find(first_subword)
if first_begin_idx == 0:
second_subword = word[len(first_subword):]
new_word_list = [first_subword, second_subword]
else:
second_subword = word[:-len(first_subword)]
new_word_list = [second_subword, first_subword]
return new_word_list
def _three_sandhi(self, word: str, finals: List[str]) -> List[str]:
if len(word) == 2 and self._all_tone_three(finals):
finals[0] = finals[0][:-1] + "2"
elif len(word) == 3:
word_list = self._split_word(word)
if self._all_tone_three(finals):
# disyllabic + monosyllabic, e.g. 蒙古/包
if len(word_list[0]) == 2:
finals[0] = finals[0][:-1] + "2"
finals[1] = finals[1][:-1] + "2"
# monosyllabic + disyllabic, e.g. 纸/老虎
elif len(word_list[0]) == 1:
finals[1] = finals[1][:-1] + "2"
else:
finals_list = [
finals[:len(word_list[0])], finals[len(word_list[0]):]
]
if len(finals_list) == 2:
for i, sub in enumerate(finals_list):
# e.g. 所有/人
if self._all_tone_three(sub) and len(sub) == 2:
finals_list[i][0] = finals_list[i][0][:-1] + "2"
# e.g. 好/喜欢
elif i == 1 and not self._all_tone_three(sub) and finals_list[i][0][-1] == "3" and \
finals_list[0][-1][-1] == "3":
finals_list[0][-1] = finals_list[0][-1][:-1] + "2"
finals = sum(finals_list, [])
# split idiom into two words who's length is 2
elif len(word) == 4:
finals_list = [finals[:2], finals[2:]]
finals = []
for sub in finals_list:
if self._all_tone_three(sub):
sub[0] = sub[0][:-1] + "2"
finals += sub
return finals
def _all_tone_three(self, finals: List[str]) -> bool:
return all(x[-1] == "3" for x in finals)
# merge "不" and the word behind it
# if don't merge, "不" sometimes appears alone according to jieba, which may occur sandhi error
def _merge_bu(self, seg: List[Tuple[str, str]]) -> List[Tuple[str, str]]:
new_seg = []
last_word = ""
for word, pos in seg:
if last_word == "":
word = last_word + word
if word != "":
new_seg.append((word, pos))
last_word = word[:]
if last_word == "":
new_seg.append((last_word, 'd'))
last_word = ""
return new_seg
# function 1: merge "一" and reduplication words in it's left and right, e.g. "听","一","听" ->"听一听"
# function 2: merge single "一" and the word behind it
# if don't merge, "一" sometimes appears alone according to jieba, which may occur sandhi error
# e.g.
# input seg: [('听', 'v'), ('一', 'm'), ('听', 'v')]
# output seg: [['听一听', 'v']]
def _merge_yi(self, seg: List[Tuple[str, str]]) -> List[Tuple[str, str]]:
new_seg = []
# function 1
for i, (word, pos) in enumerate(seg):
if i - 1 >= 0 and word == "" and i + 1 < len(seg) and seg[i - 1][
0] == seg[i + 1][0] and seg[i - 1][1] == "v":
new_seg[i - 1][0] = new_seg[i - 1][0] + "" + new_seg[i - 1][0]
else:
if i - 2 >= 0 and seg[i - 1][0] == "" and seg[i - 2][
0] == word and pos == "v":
continue
else:
new_seg.append([word, pos])
seg = new_seg
new_seg = []
# function 2
for i, (word, pos) in enumerate(seg):
if new_seg and new_seg[-1][0] == "":
new_seg[-1][0] = new_seg[-1][0] + word
else:
new_seg.append([word, pos])
return new_seg
# the first and the second words are all_tone_three
def _merge_continuous_three_tones(
self, seg: List[Tuple[str, str]]) -> List[Tuple[str, str]]:
new_seg = []
sub_finals_list = [
lazy_pinyin(
word, neutral_tone_with_five=True, style=Style.FINALS_TONE3)
for (word, pos) in seg
]
assert len(sub_finals_list) == len(seg)
merge_last = [False] * len(seg)
for i, (word, pos) in enumerate(seg):
if i - 1 >= 0 and self._all_tone_three(
sub_finals_list[i - 1]) and self._all_tone_three(
sub_finals_list[i]) and not merge_last[i - 1]:
# if the last word is reduplication, not merge, because reduplication need to be _neural_sandhi
if not self._is_reduplication(seg[i - 1][0]) and len(
seg[i - 1][0]) + len(seg[i][0]) <= 3:
new_seg[-1][0] = new_seg[-1][0] + seg[i][0]
merge_last[i] = True
else:
new_seg.append([word, pos])
else:
new_seg.append([word, pos])
return new_seg
def _is_reduplication(self, word: str) -> bool:
return len(word) == 2 and word[0] == word[1]
# the last char of first word and the first char of second word is tone_three
def _merge_continuous_three_tones_2(
self, seg: List[Tuple[str, str]]) -> List[Tuple[str, str]]:
new_seg = []
sub_finals_list = [
lazy_pinyin(
word, neutral_tone_with_five=True, style=Style.FINALS_TONE3)
for (word, pos) in seg
]
assert len(sub_finals_list) == len(seg)
merge_last = [False] * len(seg)
for i, (word, pos) in enumerate(seg):
if i - 1 >= 0 and sub_finals_list[i - 1][-1][-1] == "3" and sub_finals_list[i][0][-1] == "3" and not \
merge_last[i - 1]:
# if the last word is reduplication, not merge, because reduplication need to be _neural_sandhi
if not self._is_reduplication(seg[i - 1][0]) and len(
seg[i - 1][0]) + len(seg[i][0]) <= 3:
new_seg[-1][0] = new_seg[-1][0] + seg[i][0]
merge_last[i] = True
else:
new_seg.append([word, pos])
else:
new_seg.append([word, pos])
return new_seg
def _merge_er(self, seg: List[Tuple[str, str]]) -> List[Tuple[str, str]]:
new_seg = []
for i, (word, pos) in enumerate(seg):
if i - 1 >= 0 and word == "" and seg[i-1][0] != "#":
new_seg[-1][0] = new_seg[-1][0] + seg[i][0]
else:
new_seg.append([word, pos])
return new_seg
def _merge_reduplication(
self, seg: List[Tuple[str, str]]) -> List[Tuple[str, str]]:
new_seg = []
for i, (word, pos) in enumerate(seg):
if new_seg and word == new_seg[-1][0]:
new_seg[-1][0] = new_seg[-1][0] + seg[i][0]
else:
new_seg.append([word, pos])
return new_seg
def pre_merge_for_modify(
self, seg: List[Tuple[str, str]]) -> List[Tuple[str, str]]:
seg = self._merge_bu(seg)
try:
seg = self._merge_yi(seg)
except:
print("_merge_yi failed")
seg = self._merge_reduplication(seg)
seg = self._merge_continuous_three_tones(seg)
seg = self._merge_continuous_three_tones_2(seg)
seg = self._merge_er(seg)
return seg
def modified_tone(self, word: str, pos: str,
finals: List[str]) -> List[str]:
finals = self._bu_sandhi(word, finals)
finals = self._yi_sandhi(word, finals)
finals = self._neural_sandhi(word, pos, finals)
finals = self._three_sandhi(word, finals)
return finals

322
train_ms.py Normal file
View File

@@ -0,0 +1,322 @@
import os
import json
import argparse
import itertools
import math
import torch
from torch import nn, optim
from torch.nn import functional as F
from torch.utils.data import DataLoader
from torch.utils.tensorboard import SummaryWriter
import torch.multiprocessing as mp
import torch.distributed as dist
from torch.nn.parallel import DistributedDataParallel as DDP
from torch.cuda.amp import autocast, GradScaler
from tqdm import tqdm
import commons
import utils
from data_utils import (
TextAudioSpeakerLoader,
TextAudioSpeakerCollate,
DistributedBucketSampler
)
from models import (
SynthesizerTrn,
MultiPeriodDiscriminator,
)
from losses import (
generator_loss,
discriminator_loss,
feature_loss,
kl_loss
)
from mel_processing import mel_spectrogram_torch, spec_to_mel_torch
from text.symbols import symbols
torch.backends.cudnn.benchmark = True
global_step = 0
def main():
"""Assume Single Node Multi GPUs Training Only"""
assert torch.cuda.is_available(), "CPU training is not allowed."
n_gpus = torch.cuda.device_count()
os.environ['MASTER_ADDR'] = 'localhost'
os.environ['MASTER_PORT'] = '8000'
hps = utils.get_hparams()
mp.spawn(run, nprocs=n_gpus, args=(n_gpus, hps,))
def run(rank, n_gpus, hps):
global global_step
if rank == 0:
logger = utils.get_logger(hps.model_dir)
logger.info(hps)
utils.check_git_hash(hps.model_dir)
writer = SummaryWriter(log_dir=hps.model_dir)
writer_eval = SummaryWriter(log_dir=os.path.join(hps.model_dir, "eval"))
dist.init_process_group(backend='nccl', init_method='env://', world_size=n_gpus, rank=rank)
torch.manual_seed(hps.train.seed)
torch.cuda.set_device(rank)
train_dataset = TextAudioSpeakerLoader(hps.data.training_files, hps.data)
train_sampler = DistributedBucketSampler(
train_dataset,
hps.train.batch_size,
[32, 300, 400, 500, 600, 700, 800, 900, 1000],
num_replicas=n_gpus,
rank=rank,
shuffle=True)
collate_fn = TextAudioSpeakerCollate()
train_loader = DataLoader(train_dataset, num_workers=4, shuffle=False, pin_memory=True,
collate_fn=collate_fn, batch_sampler=train_sampler, persistent_workers=True)
if rank == 0:
eval_dataset = TextAudioSpeakerLoader(hps.data.validation_files, hps.data)
eval_loader = DataLoader(eval_dataset, num_workers=0, shuffle=False,
batch_size=1, pin_memory=True,
drop_last=False, collate_fn=collate_fn)
net_g = SynthesizerTrn(
len(symbols),
hps.data.filter_length // 2 + 1,
hps.train.segment_size // hps.data.hop_length,
n_speakers=hps.data.n_speakers,
**hps.model).cuda(rank)
freeze_enc = getattr(hps.model, "freeze_enc", False)
if freeze_enc:
print("freeze encoder !!!")
for param in net_g.enc_p.parameters():
param.requires_grad = False
net_d = MultiPeriodDiscriminator(hps.model.use_spectral_norm).cuda(rank)
optim_g = torch.optim.AdamW(
filter(lambda p: p.requires_grad, net_g.parameters()),
hps.train.learning_rate,
betas=hps.train.betas,
eps=hps.train.eps)
optim_d = torch.optim.AdamW(
net_d.parameters(),
hps.train.learning_rate,
betas=hps.train.betas,
eps=hps.train.eps)
net_g = DDP(net_g, device_ids=[rank])
net_d = DDP(net_d, device_ids=[rank])
pretrain_dir = "logs/esd"
if pretrain_dir is None:
_, _, _, epoch_str = utils.load_checkpoint(utils.latest_checkpoint_path(hps.model_dir, "G_*.pth"), net_g,
optim_g, False)
_, _, _, epoch_str = utils.load_checkpoint(utils.latest_checkpoint_path(hps.model_dir, "D_*.pth"), net_d,
optim_d, False)
epoch_str = max(epoch_str, 1)
global_step = (epoch_str - 1) * len(train_loader)
else:
_, _, _, epoch_str = utils.load_checkpoint(utils.latest_checkpoint_path(pretrain_dir, "G_*.pth"), net_g,
optim_g, True)
_, _, _, epoch_str = utils.load_checkpoint(utils.latest_checkpoint_path(pretrain_dir, "D_*.pth"), net_d,
optim_d, True)
epoch_str = 1
global_step = 0
scheduler_g = torch.optim.lr_scheduler.ExponentialLR(optim_g, gamma=hps.train.lr_decay, last_epoch=epoch_str - 2)
scheduler_d = torch.optim.lr_scheduler.ExponentialLR(optim_d, gamma=hps.train.lr_decay, last_epoch=epoch_str - 2)
scaler = GradScaler(enabled=hps.train.fp16_run)
for epoch in range(epoch_str, hps.train.epochs + 1):
if rank == 0:
train_and_evaluate(rank, epoch, hps, [net_g, net_d], [optim_g, optim_d], [scheduler_g, scheduler_d], scaler,
[train_loader, eval_loader], logger, [writer, writer_eval])
else:
train_and_evaluate(rank, epoch, hps, [net_g, net_d], [optim_g, optim_d], [scheduler_g, scheduler_d], scaler,
[train_loader, None], None, None)
scheduler_g.step()
scheduler_d.step()
def train_and_evaluate(rank, epoch, hps, nets, optims, schedulers, scaler, loaders, logger, writers):
net_g, net_d = nets
optim_g, optim_d = optims
scheduler_g, scheduler_d = schedulers
train_loader, eval_loader = loaders
if writers is not None:
writer, writer_eval = writers
train_loader.batch_sampler.set_epoch(epoch)
global global_step
net_g.train()
net_d.train()
for batch_idx, (x, x_lengths, spec, spec_lengths, y, y_lengths, speakers, tone, language, bert) in tqdm(enumerate(train_loader)):
x, x_lengths = x.cuda(rank, non_blocking=True), x_lengths.cuda(rank, non_blocking=True)
spec, spec_lengths = spec.cuda(rank, non_blocking=True), spec_lengths.cuda(rank, non_blocking=True)
y, y_lengths = y.cuda(rank, non_blocking=True), y_lengths.cuda(rank, non_blocking=True)
speakers = speakers.cuda(rank, non_blocking=True)
tone = tone.cuda(rank, non_blocking=True)
language = language.cuda(rank, non_blocking=True)
bert = bert.cuda(rank, non_blocking=True)
with autocast(enabled=hps.train.fp16_run):
y_hat, l_length, attn, ids_slice, x_mask, z_mask, \
(z, z_p, m_p, logs_p, m_q, logs_q) = net_g(x, x_lengths, spec, spec_lengths, speakers, tone, language, bert)
mel = spec_to_mel_torch(
spec,
hps.data.filter_length,
hps.data.n_mel_channels,
hps.data.sampling_rate,
hps.data.mel_fmin,
hps.data.mel_fmax)
y_mel = commons.slice_segments(mel, ids_slice, hps.train.segment_size // hps.data.hop_length)
y_hat_mel = mel_spectrogram_torch(
y_hat.squeeze(1),
hps.data.filter_length,
hps.data.n_mel_channels,
hps.data.sampling_rate,
hps.data.hop_length,
hps.data.win_length,
hps.data.mel_fmin,
hps.data.mel_fmax
)
y = commons.slice_segments(y, ids_slice * hps.data.hop_length, hps.train.segment_size) # slice
# Discriminator
y_d_hat_r, y_d_hat_g, _, _ = net_d(y, y_hat.detach())
with autocast(enabled=False):
loss_disc, losses_disc_r, losses_disc_g = discriminator_loss(y_d_hat_r, y_d_hat_g)
loss_disc_all = loss_disc
optim_d.zero_grad()
scaler.scale(loss_disc_all).backward()
scaler.unscale_(optim_d)
grad_norm_d = commons.clip_grad_value_(net_d.parameters(), None)
scaler.step(optim_d)
with autocast(enabled=hps.train.fp16_run):
# Generator
y_d_hat_r, y_d_hat_g, fmap_r, fmap_g = net_d(y, y_hat)
with autocast(enabled=False):
loss_dur = torch.sum(l_length.float())
loss_mel = F.l1_loss(y_mel, y_hat_mel) * hps.train.c_mel
loss_kl = kl_loss(z_p, logs_q, m_p, logs_p, z_mask) * hps.train.c_kl
loss_fm = feature_loss(fmap_r, fmap_g)
loss_gen, losses_gen = generator_loss(y_d_hat_g)
loss_gen_all = loss_gen + loss_fm + loss_mel + loss_dur + loss_kl
optim_g.zero_grad()
scaler.scale(loss_gen_all).backward()
scaler.unscale_(optim_g)
grad_norm_g = commons.clip_grad_value_(net_g.parameters(), None)
scaler.step(optim_g)
scaler.update()
if rank == 0:
if global_step % hps.train.log_interval == 0:
lr = optim_g.param_groups[0]['lr']
losses = [loss_disc, loss_gen, loss_fm, loss_mel, loss_dur, loss_kl]
logger.info('Train Epoch: {} [{:.0f}%]'.format(
epoch,
100. * batch_idx / len(train_loader)))
logger.info([x.item() for x in losses] + [global_step, lr])
scalar_dict = {"loss/g/total": loss_gen_all, "loss/d/total": loss_disc_all, "learning_rate": lr,
"grad_norm_d": grad_norm_d, "grad_norm_g": grad_norm_g}
scalar_dict.update(
{"loss/g/fm": loss_fm, "loss/g/mel": loss_mel, "loss/g/dur": loss_dur, "loss/g/kl": loss_kl})
scalar_dict.update({"loss/g/{}".format(i): v for i, v in enumerate(losses_gen)})
scalar_dict.update({"loss/d_r/{}".format(i): v for i, v in enumerate(losses_disc_r)})
scalar_dict.update({"loss/d_g/{}".format(i): v for i, v in enumerate(losses_disc_g)})
image_dict = {
"slice/mel_org": utils.plot_spectrogram_to_numpy(y_mel[0].data.cpu().numpy()),
"slice/mel_gen": utils.plot_spectrogram_to_numpy(y_hat_mel[0].data.cpu().numpy()),
"all/mel": utils.plot_spectrogram_to_numpy(mel[0].data.cpu().numpy()),
"all/attn": utils.plot_alignment_to_numpy(attn[0, 0].data.cpu().numpy())
}
utils.summarize(
writer=writer,
global_step=global_step,
images=image_dict,
scalars=scalar_dict)
if global_step % hps.train.eval_interval == 0:
evaluate(hps, net_g, eval_loader, writer_eval)
utils.save_checkpoint(net_g, optim_g, hps.train.learning_rate, epoch,
os.path.join(hps.model_dir, "G_{}.pth".format(global_step)))
utils.save_checkpoint(net_d, optim_d, hps.train.learning_rate, epoch,
os.path.join(hps.model_dir, "D_{}.pth".format(global_step)))
keep_ckpts = getattr(hps.train, 'keep_ckpts', 3)
if keep_ckpts > 0:
utils.clean_checkpoints(path_to_models=hps.model_dir, n_ckpts_to_keep=keep_ckpts, sort_by_time=True)
global_step += 1
if rank == 0:
logger.info('====> Epoch: {}'.format(epoch))
def evaluate(hps, generator, eval_loader, writer_eval):
generator.eval()
image_dict = {}
audio_dict = {}
print("Evaluating ...")
with torch.no_grad():
for batch_idx, (x, x_lengths, spec, spec_lengths, y, y_lengths, speakers, tone, language, bert) in enumerate(eval_loader):
print(111)
x, x_lengths = x.cuda(), x_lengths.cuda()
spec, spec_lengths = spec.cuda(), spec_lengths.cuda()
y, y_lengths = y.cuda(), y_lengths.cuda()
speakers = speakers.cuda()
bert = bert.cuda()
tone = tone.cuda()
language = language.cuda()
for use_sdp in [False, True]:
y_hat, attn, mask, *_ = generator.module.infer(x, x_lengths, speakers, tone, language, bert, y=spec, max_len=1000, sdp_ratio=0.0 if not use_sdp else 1.0)
y_hat_lengths = mask.sum([1, 2]).long() * hps.data.hop_length
mel = spec_to_mel_torch(
spec,
hps.data.filter_length,
hps.data.n_mel_channels,
hps.data.sampling_rate,
hps.data.mel_fmin,
hps.data.mel_fmax)
y_hat_mel = mel_spectrogram_torch(
y_hat.squeeze(1).float(),
hps.data.filter_length,
hps.data.n_mel_channels,
hps.data.sampling_rate,
hps.data.hop_length,
hps.data.win_length,
hps.data.mel_fmin,
hps.data.mel_fmax
)
image_dict.update({
f"gen/mel_{batch_idx}": utils.plot_spectrogram_to_numpy(y_hat_mel[0].cpu().numpy())
})
audio_dict.update({
f"gen/audio_{batch_idx}_{use_sdp}": y_hat[0, :, :y_hat_lengths[0]]
})
image_dict.update({f"gt/mel_{batch_idx}": utils.plot_spectrogram_to_numpy(mel[0].cpu().numpy())})
audio_dict.update({f"gt/audio_{batch_idx}": y[0, :, :y_lengths[0]]})
utils.summarize(
writer=writer_eval,
global_step=global_step,
images=image_dict,
audios=audio_dict,
audio_sampling_rate=hps.data.sampling_rate
)
generator.train()
if __name__ == "__main__":
main()

193
transforms.py Normal file
View File

@@ -0,0 +1,193 @@
import torch
from torch.nn import functional as F
import numpy as np
DEFAULT_MIN_BIN_WIDTH = 1e-3
DEFAULT_MIN_BIN_HEIGHT = 1e-3
DEFAULT_MIN_DERIVATIVE = 1e-3
def piecewise_rational_quadratic_transform(inputs,
unnormalized_widths,
unnormalized_heights,
unnormalized_derivatives,
inverse=False,
tails=None,
tail_bound=1.,
min_bin_width=DEFAULT_MIN_BIN_WIDTH,
min_bin_height=DEFAULT_MIN_BIN_HEIGHT,
min_derivative=DEFAULT_MIN_DERIVATIVE):
if tails is None:
spline_fn = rational_quadratic_spline
spline_kwargs = {}
else:
spline_fn = unconstrained_rational_quadratic_spline
spline_kwargs = {
'tails': tails,
'tail_bound': tail_bound
}
outputs, logabsdet = spline_fn(
inputs=inputs,
unnormalized_widths=unnormalized_widths,
unnormalized_heights=unnormalized_heights,
unnormalized_derivatives=unnormalized_derivatives,
inverse=inverse,
min_bin_width=min_bin_width,
min_bin_height=min_bin_height,
min_derivative=min_derivative,
**spline_kwargs
)
return outputs, logabsdet
def searchsorted(bin_locations, inputs, eps=1e-6):
bin_locations[..., -1] += eps
return torch.sum(
inputs[..., None] >= bin_locations,
dim=-1
) - 1
def unconstrained_rational_quadratic_spline(inputs,
unnormalized_widths,
unnormalized_heights,
unnormalized_derivatives,
inverse=False,
tails='linear',
tail_bound=1.,
min_bin_width=DEFAULT_MIN_BIN_WIDTH,
min_bin_height=DEFAULT_MIN_BIN_HEIGHT,
min_derivative=DEFAULT_MIN_DERIVATIVE):
inside_interval_mask = (inputs >= -tail_bound) & (inputs <= tail_bound)
outside_interval_mask = ~inside_interval_mask
outputs = torch.zeros_like(inputs)
logabsdet = torch.zeros_like(inputs)
if tails == 'linear':
unnormalized_derivatives = F.pad(unnormalized_derivatives, pad=(1, 1))
constant = np.log(np.exp(1 - min_derivative) - 1)
unnormalized_derivatives[..., 0] = constant
unnormalized_derivatives[..., -1] = constant
outputs[outside_interval_mask] = inputs[outside_interval_mask]
logabsdet[outside_interval_mask] = 0
else:
raise RuntimeError('{} tails are not implemented.'.format(tails))
outputs[inside_interval_mask], logabsdet[inside_interval_mask] = rational_quadratic_spline(
inputs=inputs[inside_interval_mask],
unnormalized_widths=unnormalized_widths[inside_interval_mask, :],
unnormalized_heights=unnormalized_heights[inside_interval_mask, :],
unnormalized_derivatives=unnormalized_derivatives[inside_interval_mask, :],
inverse=inverse,
left=-tail_bound, right=tail_bound, bottom=-tail_bound, top=tail_bound,
min_bin_width=min_bin_width,
min_bin_height=min_bin_height,
min_derivative=min_derivative
)
return outputs, logabsdet
def rational_quadratic_spline(inputs,
unnormalized_widths,
unnormalized_heights,
unnormalized_derivatives,
inverse=False,
left=0., right=1., bottom=0., top=1.,
min_bin_width=DEFAULT_MIN_BIN_WIDTH,
min_bin_height=DEFAULT_MIN_BIN_HEIGHT,
min_derivative=DEFAULT_MIN_DERIVATIVE):
if torch.min(inputs) < left or torch.max(inputs) > right:
raise ValueError('Input to a transform is not within its domain')
num_bins = unnormalized_widths.shape[-1]
if min_bin_width * num_bins > 1.0:
raise ValueError('Minimal bin width too large for the number of bins')
if min_bin_height * num_bins > 1.0:
raise ValueError('Minimal bin height too large for the number of bins')
widths = F.softmax(unnormalized_widths, dim=-1)
widths = min_bin_width + (1 - min_bin_width * num_bins) * widths
cumwidths = torch.cumsum(widths, dim=-1)
cumwidths = F.pad(cumwidths, pad=(1, 0), mode='constant', value=0.0)
cumwidths = (right - left) * cumwidths + left
cumwidths[..., 0] = left
cumwidths[..., -1] = right
widths = cumwidths[..., 1:] - cumwidths[..., :-1]
derivatives = min_derivative + F.softplus(unnormalized_derivatives)
heights = F.softmax(unnormalized_heights, dim=-1)
heights = min_bin_height + (1 - min_bin_height * num_bins) * heights
cumheights = torch.cumsum(heights, dim=-1)
cumheights = F.pad(cumheights, pad=(1, 0), mode='constant', value=0.0)
cumheights = (top - bottom) * cumheights + bottom
cumheights[..., 0] = bottom
cumheights[..., -1] = top
heights = cumheights[..., 1:] - cumheights[..., :-1]
if inverse:
bin_idx = searchsorted(cumheights, inputs)[..., None]
else:
bin_idx = searchsorted(cumwidths, inputs)[..., None]
input_cumwidths = cumwidths.gather(-1, bin_idx)[..., 0]
input_bin_widths = widths.gather(-1, bin_idx)[..., 0]
input_cumheights = cumheights.gather(-1, bin_idx)[..., 0]
delta = heights / widths
input_delta = delta.gather(-1, bin_idx)[..., 0]
input_derivatives = derivatives.gather(-1, bin_idx)[..., 0]
input_derivatives_plus_one = derivatives[..., 1:].gather(-1, bin_idx)[..., 0]
input_heights = heights.gather(-1, bin_idx)[..., 0]
if inverse:
a = (((inputs - input_cumheights) * (input_derivatives
+ input_derivatives_plus_one
- 2 * input_delta)
+ input_heights * (input_delta - input_derivatives)))
b = (input_heights * input_derivatives
- (inputs - input_cumheights) * (input_derivatives
+ input_derivatives_plus_one
- 2 * input_delta))
c = - input_delta * (inputs - input_cumheights)
discriminant = b.pow(2) - 4 * a * c
assert (discriminant >= 0).all()
root = (2 * c) / (-b - torch.sqrt(discriminant))
outputs = root * input_bin_widths + input_cumwidths
theta_one_minus_theta = root * (1 - root)
denominator = input_delta + ((input_derivatives + input_derivatives_plus_one - 2 * input_delta)
* theta_one_minus_theta)
derivative_numerator = input_delta.pow(2) * (input_derivatives_plus_one * root.pow(2)
+ 2 * input_delta * theta_one_minus_theta
+ input_derivatives * (1 - root).pow(2))
logabsdet = torch.log(derivative_numerator) - 2 * torch.log(denominator)
return outputs, -logabsdet
else:
theta = (inputs - input_cumwidths) / input_bin_widths
theta_one_minus_theta = theta * (1 - theta)
numerator = input_heights * (input_delta * theta.pow(2)
+ input_derivatives * theta_one_minus_theta)
denominator = input_delta + ((input_derivatives + input_derivatives_plus_one - 2 * input_delta)
* theta_one_minus_theta)
outputs = input_cumheights + numerator / denominator
derivative_numerator = input_delta.pow(2) * (input_derivatives_plus_one * theta.pow(2)
+ 2 * input_delta * theta_one_minus_theta
+ input_derivatives * (1 - theta).pow(2))
logabsdet = torch.log(derivative_numerator) - 2 * torch.log(denominator)
return outputs, logabsdet

284
utils.py Normal file
View File

@@ -0,0 +1,284 @@
import os
import glob
import sys
import argparse
import logging
import json
import subprocess
import numpy as np
from scipy.io.wavfile import read
import torch
MATPLOTLIB_FLAG = False
logging.basicConfig(stream=sys.stdout, level=logging.DEBUG)
logger = logging
def load_checkpoint(checkpoint_path, model, optimizer=None, skip_optimizer=False):
assert os.path.isfile(checkpoint_path)
checkpoint_dict = torch.load(checkpoint_path, map_location='cpu')
iteration = checkpoint_dict['iteration']
learning_rate = checkpoint_dict['learning_rate']
if optimizer is not None and not skip_optimizer and checkpoint_dict['optimizer'] is not None:
optimizer.load_state_dict(checkpoint_dict['optimizer'])
saved_state_dict = checkpoint_dict['model']
if hasattr(model, 'module'):
state_dict = model.module.state_dict()
else:
state_dict = model.state_dict()
new_state_dict = {}
for k, v in state_dict.items():
try:
# assert "dec" in k or "disc" in k
# print("load", k)
new_state_dict[k] = saved_state_dict[k]
assert saved_state_dict[k].shape == v.shape, (saved_state_dict[k].shape, v.shape)
except:
print("error, %s is not in the checkpoint" % k)
new_state_dict[k] = v
if hasattr(model, 'module'):
model.module.load_state_dict(new_state_dict)
else:
model.load_state_dict(new_state_dict)
print("load ")
logger.info("Loaded checkpoint '{}' (iteration {})".format(
checkpoint_path, iteration))
return model, optimizer, learning_rate, iteration
def save_checkpoint(model, optimizer, learning_rate, iteration, checkpoint_path):
logger.info("Saving model and optimizer state at iteration {} to {}".format(
iteration, checkpoint_path))
if hasattr(model, 'module'):
state_dict = model.module.state_dict()
else:
state_dict = model.state_dict()
torch.save({'model': state_dict,
'iteration': iteration,
'optimizer': optimizer.state_dict(),
'learning_rate': learning_rate}, checkpoint_path)
def summarize(writer, global_step, scalars={}, histograms={}, images={}, audios={}, audio_sampling_rate=22050):
for k, v in scalars.items():
writer.add_scalar(k, v, global_step)
for k, v in histograms.items():
writer.add_histogram(k, v, global_step)
for k, v in images.items():
writer.add_image(k, v, global_step, dataformats='HWC')
for k, v in audios.items():
writer.add_audio(k, v, global_step, audio_sampling_rate)
def latest_checkpoint_path(dir_path, regex="G_*.pth"):
f_list = glob.glob(os.path.join(dir_path, regex))
f_list.sort(key=lambda f: int("".join(filter(str.isdigit, f))))
x = f_list[-1]
print(x)
return x
def plot_spectrogram_to_numpy(spectrogram):
global MATPLOTLIB_FLAG
if not MATPLOTLIB_FLAG:
import matplotlib
matplotlib.use("Agg")
MATPLOTLIB_FLAG = True
mpl_logger = logging.getLogger('matplotlib')
mpl_logger.setLevel(logging.WARNING)
import matplotlib.pylab as plt
import numpy as np
fig, ax = plt.subplots(figsize=(10, 2))
im = ax.imshow(spectrogram, aspect="auto", origin="lower",
interpolation='none')
plt.colorbar(im, ax=ax)
plt.xlabel("Frames")
plt.ylabel("Channels")
plt.tight_layout()
fig.canvas.draw()
data = np.fromstring(fig.canvas.tostring_rgb(), dtype=np.uint8, sep='')
data = data.reshape(fig.canvas.get_width_height()[::-1] + (3,))
plt.close()
return data
def plot_alignment_to_numpy(alignment, info=None):
global MATPLOTLIB_FLAG
if not MATPLOTLIB_FLAG:
import matplotlib
matplotlib.use("Agg")
MATPLOTLIB_FLAG = True
mpl_logger = logging.getLogger('matplotlib')
mpl_logger.setLevel(logging.WARNING)
import matplotlib.pylab as plt
import numpy as np
fig, ax = plt.subplots(figsize=(6, 4))
im = ax.imshow(alignment.transpose(), aspect='auto', origin='lower',
interpolation='none')
fig.colorbar(im, ax=ax)
xlabel = 'Decoder timestep'
if info is not None:
xlabel += '\n\n' + info
plt.xlabel(xlabel)
plt.ylabel('Encoder timestep')
plt.tight_layout()
fig.canvas.draw()
data = np.fromstring(fig.canvas.tostring_rgb(), dtype=np.uint8, sep='')
data = data.reshape(fig.canvas.get_width_height()[::-1] + (3,))
plt.close()
return data
def load_wav_to_torch(full_path):
sampling_rate, data = read(full_path)
return torch.FloatTensor(data.astype(np.float32)), sampling_rate
def load_filepaths_and_text(filename, split="|"):
with open(filename, encoding='utf-8') as f:
filepaths_and_text = [line.strip().split(split) for line in f]
return filepaths_and_text
def get_hparams(init=True):
parser = argparse.ArgumentParser()
parser.add_argument('-c', '--config', type=str, default="./configs/base.json",
help='JSON file for configuration')
parser.add_argument('-m', '--model', type=str, required=True,
help='Model name')
args = parser.parse_args()
model_dir = os.path.join("./logs", args.model)
if not os.path.exists(model_dir):
os.makedirs(model_dir)
config_path = args.config
config_save_path = os.path.join(model_dir, "config.json")
if init:
with open(config_path, "r") as f:
data = f.read()
with open(config_save_path, "w") as f:
f.write(data)
else:
with open(config_save_path, "r") as f:
data = f.read()
config = json.loads(data)
hparams = HParams(**config)
hparams.model_dir = model_dir
return hparams
def clean_checkpoints(path_to_models='logs/44k/', n_ckpts_to_keep=2, sort_by_time=True):
"""Freeing up space by deleting saved ckpts
Arguments:
path_to_models -- Path to the model directory
n_ckpts_to_keep -- Number of ckpts to keep, excluding G_0.pth and D_0.pth
sort_by_time -- True -> chronologically delete ckpts
False -> lexicographically delete ckpts
"""
import re
ckpts_files = [f for f in os.listdir(path_to_models) if os.path.isfile(os.path.join(path_to_models, f))]
name_key = (lambda _f: int(re.compile('._(\d+)\.pth').match(_f).group(1)))
time_key = (lambda _f: os.path.getmtime(os.path.join(path_to_models, _f)))
sort_key = time_key if sort_by_time else name_key
x_sorted = lambda _x: sorted([f for f in ckpts_files if f.startswith(_x) and not f.endswith('_0.pth')],
key=sort_key)
to_del = [os.path.join(path_to_models, fn) for fn in
(x_sorted('G')[:-n_ckpts_to_keep] + x_sorted('D')[:-n_ckpts_to_keep])]
del_info = lambda fn: logger.info(f".. Free up space by deleting ckpt {fn}")
del_routine = lambda x: [os.remove(x), del_info(x)]
rs = [del_routine(fn) for fn in to_del]
def get_hparams_from_dir(model_dir):
config_save_path = os.path.join(model_dir, "config.json")
with open(config_save_path, "r") as f:
data = f.read()
config = json.loads(data)
hparams = HParams(**config)
hparams.model_dir = model_dir
return hparams
def get_hparams_from_file(config_path):
with open(config_path, "r") as f:
data = f.read()
config = json.loads(data)
hparams = HParams(**config)
return hparams
def check_git_hash(model_dir):
source_dir = os.path.dirname(os.path.realpath(__file__))
if not os.path.exists(os.path.join(source_dir, ".git")):
logger.warn("{} is not a git repository, therefore hash value comparison will be ignored.".format(
source_dir
))
return
cur_hash = subprocess.getoutput("git rev-parse HEAD")
path = os.path.join(model_dir, "githash")
if os.path.exists(path):
saved_hash = open(path).read()
if saved_hash != cur_hash:
logger.warn("git hash values are different. {}(saved) != {}(current)".format(
saved_hash[:8], cur_hash[:8]))
else:
open(path, "w").write(cur_hash)
def get_logger(model_dir, filename="train.log"):
global logger
logger = logging.getLogger(os.path.basename(model_dir))
logger.setLevel(logging.DEBUG)
formatter = logging.Formatter("%(asctime)s\t%(name)s\t%(levelname)s\t%(message)s")
if not os.path.exists(model_dir):
os.makedirs(model_dir)
h = logging.FileHandler(os.path.join(model_dir, filename))
h.setLevel(logging.DEBUG)
h.setFormatter(formatter)
logger.addHandler(h)
return logger
class HParams():
def __init__(self, **kwargs):
for k, v in kwargs.items():
if type(v) == dict:
v = HParams(**v)
self[k] = v
def keys(self):
return self.__dict__.keys()
def items(self):
return self.__dict__.items()
def values(self):
return self.__dict__.values()
def __len__(self):
return len(self.__dict__)
def __getitem__(self, key):
return getattr(self, key)
def __setitem__(self, key, value):
return setattr(self, key, value)
def __contains__(self, key):
return key in self.__dict__
def __repr__(self):
return self.__dict__.__repr__()