sort imports

This commit is contained in:
shaynemei 2022-08-01 20:37:16 -07:00
parent 2f75236c05
commit e7b5a8ecbb
3 changed files with 8 additions and 17 deletions

View File

@ -74,14 +74,10 @@ from beam_search import (
greedy_search_batch, greedy_search_batch,
modified_beam_search, modified_beam_search,
) )
from gigaspeech_scoring import asr_text_post_processing from .gigaspeech_scoring import asr_text_post_processing
from train import get_params, get_transducer_model from .train import get_params, get_transducer_model
from icefall.checkpoint import ( from icefall.checkpoint import average_checkpoints, find_checkpoints, load_checkpoint
average_checkpoints,
find_checkpoints,
load_checkpoint,
)
from icefall.utils import ( from icefall.utils import (
AttributeDict, AttributeDict,
setup_logger, setup_logger,

View File

@ -51,11 +51,7 @@ import sentencepiece as spm
import torch import torch
from train import get_params, get_transducer_model from train import get_params, get_transducer_model
from icefall.checkpoint import ( from icefall.checkpoint import average_checkpoints, find_checkpoints, load_checkpoint
average_checkpoints,
find_checkpoints,
load_checkpoint,
)
from icefall.utils import str2bool from icefall.utils import str2bool

View File

@ -15,15 +15,14 @@
# The data structure is based on: kaldi/egs/wsj/s5/utils/lang/make_phone_lm.py # The data structure is based on: kaldi/egs/wsj/s5/utils/lang/make_phone_lm.py
# The smoothing algorithm is based on: http://www.speech.sri.com/projects/srilm/manpages/ngram-discount.7.html # The smoothing algorithm is based on: http://www.speech.sri.com/projects/srilm/manpages/ngram-discount.7.html
import sys import argparse
import os
import re
import io import io
import math import math
import argparse import os
import re
import sys
from collections import Counter, defaultdict from collections import Counter, defaultdict
parser = argparse.ArgumentParser(description=""" parser = argparse.ArgumentParser(description="""
Generate kneser-ney language model as arpa format. By default, Generate kneser-ney language model as arpa format. By default,
it will read the corpus from standard input, and output to standard output. it will read the corpus from standard input, and output to standard output.