I'm trying to extract the phonetic spelling of a web dictionary entry.
Specifically, this dictionary AVL-DNV
我正在尝试提取网络词典条目的语音拼写。具体地说,本词典AVL-DNV
Is there any way of working with phonetic language in Python and extracting the phonetic spelling from a web?
My goal would be to extract something like this [peɾɔ́l].
有没有办法在Python中处理语音语言,并从Web中提取语音拼写?我的目标将是提炼出这样的东西[PEɾɔ́L]。
更多回答
优秀答案推荐
For extracting things from HTML documents you can use beautifulsoup. For example:
要从HTML文档中提取内容,您可以使用美丽汤。例如:
import warnings
import requests
from bs4 import BeautifulSoup
warnings.filterwarnings("ignore")
url = "https://www.avl.gva.es/lexicval/?paraula=perol"
soup = BeautifulSoup(requests.get(url).content, "html.parser")
ph = [tag.text for tag in soup.select(".trfonetica")]
print(ph[-1])
Prints:
打印:
[peɾɔ́l]
更多回答
我是一名优秀的程序员,十分优秀!