Skip to Content
금융 전략을 위한 머신러닝: 19가지 사례를 통해 익히는 금융 전략, 머신러닝, 데이터 과학
book

금융 전략을 위한 머신러닝: 19가지 사례를 통해 익히는 금융 전략, 머신러닝, 데이터 과학

by 김한상, 하리옴 탓샛, 사힐 푸리, 브래드 루카보
December 2021
Beginner to intermediate
468 pages
11h 42m
Korean
Hanbit Media, Inc.
Content preview from 금융 전략을 위한 머신러닝: 19가지 사례를 통해 익히는 금융 전략, 머신러닝, 데이터 과학
425
10
자연어 처리
JSON
형식이 알고리즘에 적합하지 않음을 알 수 있다.
JSON
에서 뉴스를 얻어야 한다.
Regex
는 이 단계에서 중요한 부분이다.
Regex
는 원시적이고 지저분한 텍스트에서 패턴을
찾아 그에 따라 작업을 수행할 수 있다. 다음 함수는
JSON
파일에 인코딩된 정보를 사용해
HTML
구문 분석을 수행한다.
def jsonParser(json_data):
xml_data = json_data[‘content’]
tree = etree.parse(StringIO(xml_data), parser=etree.HTMLParser())
headlines = tree.xpath(“//h4[contains(@class, ‘media-heading’)]/a/text()”)
assert len(headlines) == json_data[‘count’]
main_tickers = list(map(lambda x: x.replace(‘/symbol/’, ‘’),\
tree.xpath(“//div[contains(@class, ‘media-left’)]//a/@href”)))
assert len(main_tickers) == json_data[‘count’]
final_headlines = [‘’.join(f.xpath(‘.//text()’)) ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

자바로 배우는 핵심 자료구조와 알고리즘: 기술 면접에 필요한 실용주의 자료구조와 알고리즘

자바로 배우는 핵심 자료구조와 알고리즘: 기술 면접에 필요한 실용주의 자료구조와 알고리즘

유동환, 앨런 B. 다우니

Publisher Resources

ISBN: 9791162245002