Advertisement

用Python语言处理lrc文件中的不重复单词数量

阅读量:
复制代码
 # coding=utf-8

    
  
    
 import os
    
 import concurrent
    
 import threading
    
 import asyncio
    
  
    
 gPool = concurrent.futures.ThreadPoolExecutor(5)
    
 gLock = threading.Lock()
    
  
    
  
    
 async def dealOne(path):
    
     words = {}
    
     with open(path, "r") as f:
    
     while True:
    
         line = f.readline()
    
         if not line:
    
             break
    
  
    
         idx = line.find("]")
    
         if idx != -1:
    
             text = line[idx+1:].strip().strip(";").strip()
    
             sp = text.split()
    

全部评论 (0)

还没有任何评论哟~