张同学2026-06-10 18:36:52
只要是TAG就去除,还是只去除不重要的TAG? 这个部分没听太懂
回答(1)
最佳
Vincent2026-06-12 08:58:00
你好
根据CFA教材的标准做法,是去除所有HTML标签,因为大多数网页标签(如 </p>, <font size="4">)对金融文本分析没有语义价值。但教材也承认“某些通用标签可以保留以维持格式含义”。
Remove html tags: Most of the text data are acquired from web pages, and the text inherits html markup tags with the actual content. The initial task is to remove (or strip) the html tags that are not part of the actual text using programming functions or using regular expressions。默认情况下的标准做法是:把所有HTML标签都去除。
教材紧接着在“注”中提到:Note that it is not uncommon to keep some generic html tags to maintain certain formatting meaning in the text.
翻译:注意,保留一些通用HTML标签以维持文本中的某些格式含义。比如标题层级、强调格式等语义信息时。
考试中,如果问到,“全部去除”是正确的;除非题干特别提到“维持格式”,则保留。
- 评论(0)
- 追问(0)
评论
0/1000
追答
0/1000
+上传图片

