Giter Site home page Giter Site logo

kkszysiu / pycharlockholmes Goto Github PK

View Code? Open in Web Editor NEW

This project forked from douban/pycharlockholmes

0.0 3.0 1.0 1.29 MB

Character encoding detecting library for Python using ICU and libmagic. Based on Ruby implementation https://github.com/brianmario/charlock_holmes

License: BSD 3-Clause "New" or "Revised" License

Python 37.64% C 30.46% C++ 1.25% Common Lisp 30.50% Shell 0.14%

pycharlockholmes's Introduction

pycharlockholmes

Build Status

Character encoding detecting library for Python using ICU and libmagic. Inspired by Charlock Holmes

Dependency

  1. icu
  2. file(libmagic)

Gentoo

emerge -av dev-libs/icu
emerge -av sys-apps/file

Ubuntu

apt-get install libicu-dev
apt-get install libmagic-dev

Brew

brew install icu4c
brew install libmagic
export ICUI18N="/usr/local/Cellar/icu4c/xx" # Replace "xx" as the version of your icu
export MAGIC="/usr/local/Cellar/libmagic/xx" # Replace "xx" as the version of your libmagic

Install

python setup build
python setup install

Usage

from charlockholmes import detect
file = open('test.txt')
content = file.read()
print detect(content)

License

Modified BSD License

pycharlockholmes's People

Contributors

xtao avatar kkszysiu avatar liluo avatar

Watchers

 avatar James Cloos avatar  avatar

Forkers

pombreda

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.