Skip to Content
Bad Data 技術手冊
book

Bad Data 技術手冊

by Q. Ethan McCallum
September 2013
Intermediate to advanced
264 pages
5h
Chinese
GoTop Information, Inc.
Content preview from Bad Data 技術手冊
54
|
第四章:隱藏在純文字中的壞資料
純文字是用什麼編碼?
McIlroy 在本章最前面的建議是非常有影響力的,但要先提醒你一句話:
某些文字是比
其他的文字更普及的
。文字編碼是在純文字檔案的字元與電腦用來表現它們的數字之
間的對應方式。若多個資料來源分別使用不同的文字編碼,那麼使用這些資料的程式的
行為可能會產生一些錯誤的行為。
當我在配對列在純文字文件中的姓名時,我會遇到這個問題。我們客戶給我一些純文字
檔案,裡面是姓名的清單。有些清單是包含客戶的合作夥伴姓名,而有些則是他們企業
拒絕往來戶的姓名清單。這些清單差不多就是這樣,最多加上一些說明文件。這個專案
是要審查哪些客戶的合作夥伴是拒絕往來戶。我撰寫的配對軟體只是解決方案中的其中
一部分。配對到的人名將會被送至調查小組讓其他人繼續審查。
在這樣的環境之下,配對軟體的錯誤會產生不對稱的成本。誤測為拒絕往來戶的成本
false positive,也就是被調查小組駁回的配對)就是人類要拒絕該配對的成本。未找
出的拒絕往來戶(false negative)則會讓客戶無法接受到調查小組的警告而可能會有跟
不好的客戶合作的危險。客戶想要能夠調整配對軟體的錯誤形式,也就是說,要能夠選
擇寧願多找出一些誤測的人名而不要讓自己暴露在危險之中,或是選擇相反的方式。若
我沒有發現並且處理下方所描述的文字編碼問題,那麼客戶很可能會低估拒絕往來戶所
帶來的危險性。
讓我們先來討論文字編碼的基礎,瞭解為什麼現今我們會使用多種文字編碼。然後我們
會討論要如何在任何的純文字檔案中偵測編碼並且將編碼一致化。在我會使用電腦時, ...
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.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

RxJava反应式编程

RxJava反应式编程

Tomasz Nurkiewicz, Ben Christensen
高效能PYTHON程式設計

高效能PYTHON程式設計

Micha Gorelick, Ian Ozsvald
Kubernetes编程

Kubernetes编程

Michael Hausenblas, Stefan Schimanski

Publisher Resources

ISBN: 9789862768952