Comments (3)
@eltonfonseca Does the following code works correctly?
require 'pycall'
NLTK = PyCall.import_module('nltk')
class RequerimentsController < ApplicationController
layout "admin"
def index
end
def show
end
def new
@requeriment = Requeriment.new
message = "Testando a integracao."
NTLK.word_tokenize(message)
end
end
BTW, please show the full messages by SEGV. Don't cut its fragment your own decision.
from pycall.rb.
Hello @mrkn, I ran and gave the following error:
NameError at /requeriments/new
uninitialized constant RequerimentsController::NTLK
but I was able to solve the problem by typing the following code.
require 'pycall'
class RequerimentsController < ApplicationController
layout "admin"
def index
end
def show
end
def new
@requeriment = Requeriment.new
message = "Testando a integracao."
nltk = PyCall.import_module('nltk')
puts nltk.word_tokenize(message)
end
end
Thank you for your attention and for your help!
from pycall.rb.
@eltonfonseca That's good!
from pycall.rb.
Related Issues (20)
- "[BUG] object allocation during garbage collection phase" on Windows HOT 1
- uninitialized constant PyCall::LibPython::Helpers HOT 7
- Using pycall on Dokku (Heroku compatible alternative) HOT 13
- PyCall::LibPythonFunctionNotFound (Unable to find the required symbol in libpython: _Py_NoneStruct) HOT 5
- _Py_NoneStruct (PyCall::LibPythonFunctionNotFound) HOT 1
- how to deploy to heroku? HOT 9
- import_module from other folder than lib? HOT 1
- Question about loading a subclass HOT 1
- exceptions not raised from within without_gvl block HOT 1
- pycall freezes and never resolves during a controller function HOT 1
- DeprecationWarning: The distutils.sysconfig module is deprecated, use sysconfig instead
- Catching python STDOUT
- Memory issue HOT 2
- Memory leak with numpy HOT 1
- Unable to find required symbol in libpython when using a conda env HOT 1
- call with docx module, GIL is released (the current Python thread state is NULL) HOT 1
- cannot move cursor
- Test failure on 3.12 HOT 2
- [BUG] pycall/pytypeobject_wrapper.rb:24: [BUG] Segmentation fault at 0x0000000000000010 HOT 4
- Problems to run PyCall in WSL2 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pycall.rb.