GithubHelp home page GithubHelp logo

Comments (7)

saffsd avatar saffsd commented on August 29, 2024

Hi Frederik,

Thanks for reporting the issue. There is a branch that works in Python 3 here. I'd very much like to have a single codebase that runs in both Python 2/3 but I've not had a chance to look into how to do this. If you have any experience in this respect any patches would be appreciated.

Cheers,
Marco

from langid.py.

frederik-elwert avatar frederik-elwert commented on August 29, 2024

Thanks, works perfectly!

Re 2/3: I guess using six would be the easiest way to achieve that.

from langid.py.

adampl avatar adampl commented on August 29, 2024

That branch is not fully Python 3 compatible.

There is a lot of syntax errors caused by prints without parentheses. To see them, just run:
pip install https://github.com/saffsd/langid.py/archive/python3.zip.

from langid.py.

saffsd avatar saffsd commented on August 29, 2024

Hi Adam,

Thanks for getting in touch. You're right that the port is incomplete,
currently only the core classifier langid.py itself has been ported, the
supporting tools for model building have not. You should be able to use the
file langid.py from that branch in a python3 project.

On Thu, Feb 19, 2015 at 10:27 PM, Adam [email protected] wrote:

That branch is not fully Python 3 compatible.

There is a lot of syntax errors caused by prints without parentheses. To
see them, just run:
pip install https://github.com/saffsd/langid.py/archive/python3.zip.

β€”
Reply to this email directly or view it on GitHub
#28 (comment).

from langid.py.

rrshaban avatar rrshaban commented on August 29, 2024

@adampl Given that Python2 supports print with parantheses, why not just convert all the print statements to parantheses? Or maybe this has already been done, it's been a couple of months.

from langid.py.

adampl avatar adampl commented on August 29, 2024

@rrshaban There may be other incompatibilities as well, prints are just the most obvious ones.

from langid.py.

saffsd avatar saffsd commented on August 29, 2024

As of 600f530 the core script langid/langid.py runs in both Python2 and Python3 interpreters. Porting the training tools is a bigger job and not in my workplan at the moment. I'll mark this as closed for now.

from langid.py.

Related Issues (20)

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.