Integrate external library

Hello,

I am wondering if it is possible to integrate some Python libraries with Elm and import them or refer to them in my Elm program and use it. for example if I need the spaCy “Python library for advanced natural language processing” library, how can I use it in Elm? Or think of any python library.

If its not possible, then how can I integrate the result of my work which is done in another language and then use it in Elm? I hope I have cleared myself. please ask me if it is a No.

Thank You.

Are you running Elm in browser or somewhere else, e.g. in console using NodeJs?

If running in browser, then you can’t integrate directly as no known browser will execute Python. You would need to use server in-between and use HTTP requests to communicate between Elm running in browser and Python running in server.

If using NodeJs, then I believe it has ability to execute external programs, so you could use that to execute Python program.

Some discussion about both options here (this refers to JavaScript, but applies also to Elm):

1 Like

Thank You,
I am creating a small part of a website using Elm, and there I need to do some NLP stuff. since there is no library in Elm for Natural Language Processing, I would like to do it in Python and then import the result into my Elm.
I am currently doing it in browser only.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.