0.1.195
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
[metadata]
|
||||
# replace with your username:
|
||||
name = guan
|
||||
version = 0.1.194
|
||||
version = 0.1.195
|
||||
author = guanjihuan
|
||||
author_email = guanjihuan@163.com
|
||||
description = An open source python package
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Metadata-Version: 2.4
|
||||
Name: guan
|
||||
Version: 0.1.194
|
||||
Version: 0.1.195
|
||||
Summary: An open source python package
|
||||
Home-page: https://py.guanjihuan.com
|
||||
Author: guanjihuan
|
||||
|
||||
@@ -337,6 +337,14 @@ def run_programs_sequentially(program_files=['./a.py', './b.py'], execute='pytho
|
||||
end = time.time()
|
||||
print('Total running time = '+str((end-start)/60)+' min')
|
||||
|
||||
# 根据 “.” 和 “。” 符号进行分句
|
||||
def split_text_into_sentences(text):
|
||||
import re
|
||||
pattern = r'(?<=[。])|(?<=\.)(?=\s|$)'
|
||||
sentences = re.split(pattern, text)
|
||||
sentence_array = [s.strip() for s in sentences if s.strip()]
|
||||
return sentence_array
|
||||
|
||||
# 根据一定的字符长度来分割文本
|
||||
def split_text(text, width=100):
|
||||
split_text_list = [text[i:i+width] for i in range(0, len(text), width)]
|
||||
|
||||
@@ -770,7 +770,7 @@ def creat_qrcode(data="https://www.guanjihuan.com", filename='a', file_format='.
|
||||
img = qrcode.make(data)
|
||||
img.save(filename+file_format)
|
||||
|
||||
# 通过Sci-Hub网站下载文献
|
||||
# 通过Sci-Hub网站下载文献(该方法可能失效)
|
||||
def download_with_scihub(address=None, num=1):
|
||||
from bs4 import BeautifulSoup
|
||||
import re
|
||||
|
||||
Reference in New Issue
Block a user