gpt4 book ai didi

How to extract phonetic language from the web with Python(如何使用Python从Web上提取语音语言)

转载 作者:bug小助手 更新时间:2023-10-28 11:23:20 25 4
gpt4 key购买 nike



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 . 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]

更多回答

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com