How do I include 3rd party Python modules (NLTK) into a C# application?

Locked How do I include 3rd party Python modules (NLTK) into a C# application?

  • Tuesday, June 08, 2010 7:27 PM
     
     

     

    Hello,

    I have an embedded Python C# application that uses the NLTK.

    How do I include NLTK into a C# application?

    Thanks.

     

     


    williamj

All Replies

  • Tuesday, June 08, 2010 8:59 PM
     
     Answered

    I would imagine you need something like IronPython to run the Python code as MSIL. Try http://www.ironpython.net/support/ if you need help in IronPython.



    The following is signature, not part of post
    Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
    Visual C++ MVP
  • Wednesday, June 09, 2010 4:19 PM
     
     

     

    Yep.

    But how do I include the NTLK modules (in Python)?

    Thanks.

     


    williamj
  • Wednesday, June 09, 2010 5:37 PM
     
     Answered
    You can't include Python code in a C# project. The C# compiler does not understand Python. If you want to see if you can include NTLK to a IronPython project, try the link mentioned above. 

    The following is signature, not part of post
    Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
    Visual C++ MVP