118
questions
1
vote
0
answers
28
views
GraalVM polyglot not able to find installed language
I am getting this exception.
java.lang.IllegalArgumentException: A language with id 'python' is not
installed. Installed languages are: [].
at org.graalvm.truffle/com.oracle.truffle.polyglot....
0
votes
1
answer
62
views
Passing classes and methods as Value with GraalVM Polyglot
I'm trying to use the Polyglot API of GraalVM, and an example I see in the documentation does not work.
The documentation of Context.asValue states:
When Java host objects are passed to guest ...
0
votes
0
answers
65
views
Error installing JavaScript language in GraalVM: Unsupported GraalVM version
Downloading: Component catalog from www.graalvm.org
Could not load channel https://www.graalvm.org/component-catalog/graal-updater-component-catalog.properties: Unsupported GraalVM version: 22.1.0.1, ...
0
votes
0
answers
36
views
How to disable top-level statements in .ipynb notepads from Polyglot extension in vs code
How to disable top-level statements in .ipynb notepads from Polyglot extension in vs code?
Only found how to disable them when creating a new console application - dotnet new console --use-program-...
2
votes
0
answers
243
views
Using polyglot notebooks in Visual Studio Code how can you autoimport missing namespaces for .NET C#
Using polyglot notebooks in VS Code with .NET8, I cannot seem to figure out how to trigger the autoimport functionality, "Quick action", normaly used with dotnet development.
I have checked ...
2
votes
2
answers
130
views
Warning inside a preprocessor "#if 0" section
So I have a polyglot header file that is included/imported from Python and C++. The part I'm insterested in looks like so:
#pragma once
#if 0
"""
#endif
constexpr int
#if 0
"&...
0
votes
1
answer
57
views
Polyglot Dependencies Causes Trouble During Multi Stage Containerization (Python) - Docker
On the containerization step for a project which is using polyglot, tensorflow etc. I got error on multistage containerization from the dependencies of polyglot.
I can do a single stage ...
0
votes
0
answers
204
views
SPIN/JACKSON-JSON-01002 Expected ‘SpinList’, got ‘OBJECT’
I’m a bit new in Camunda.
I get an error when adding variable to idDcoumento from tasklist in http-connector in payload variable.
The inlined javascript is as follow:
var postJSONTemp = ‘{
“idUsuario”:...
0
votes
0
answers
61
views
Unexpected Object Type Returned When Using GraalVM in Java
I'm currently working with GraalVM in Java and encountering an issue with the object type returned by a function. Here's the code snippet:
import com.oracle.truffle.js.scriptengine.GraalJSScriptEngine;...
2
votes
1
answer
197
views
F# Debugger in VS Code Polyglot (Interactive) Notbook
Is there an F# debugger extension for use in VS Code Polyglot (formerly Interactive) Notebooks?
I need to see what is happening to my data structures in my Polyglot F# code. It owuld be great to see ...
0
votes
0
answers
85
views
c# Dataframe - how to visualize dataframe in a not notebook app
how to visualize a dataframe in a NOT NOTEBOOK APP (in a console application e.g.)
using a library like XPlot.Plotly in a console application
var data = Enumerable.Range(0, 100).Select(v => v + .0);...
4
votes
3
answers
959
views
Display Mermaid diagram from C# variable in Polyglot notebook
I know that Polyglot notebooks support Mermaid diagrams. But it doesn't support veriable sharing. Suppose I have diagram code in C# string variable. Are there any possibility to display that string as ...
1
vote
0
answers
1k
views
Not able to call Java class via Karate."org.graalvm.polyglot.PolyglotExcepti1on: TypeError: Access to host class is not allowed or does not exist."
I am trying to call a Java class which has two methods in it. But the execution fails in the below line.
`* def javademo = Java.type('feature.AuthCode')
Error:
* def javademo = Java.type('feature....
7
votes
0
answers
545
views
How to use a manually installed .NET SDK in Polyglot Notebook
I am trying to use Polyglot Notebooks in VS Code. I am on a corporate computer that only has Dotnet SDK 5.0 installed, and I do not have admin privileges. I have downloaded the binaries for the most ...
1
vote
0
answers
92
views
Unable to access java method having arguments using java interop in karate (methods with no arguments are accessed fine)
This is my Java Class (for the sake of simplicity, omitting few obvious details)
package com.abc.hstools.core.services;
import com.abc.hstools.core.css.MatchListResponse;
public class ...
0
votes
1
answer
758
views
How to construct connect mssql command with variable in Polyglot Notebook
How to construct a magic connect command with variable? For example with a variable value as myserver.
#!value --name sqlserver
myserver
#!share sqlserver --from value
string sqlconnstr = $"...
1
vote
0
answers
415
views
org.graalvm.polyglot.PolyglotException when '(' ')' used in regex in karate.match()
I want to check whether the values in array match regex using 'karate.match'
But I'm getting polyglot exception because I have brackets in my regex, any idea how to fix this issue?
* def result= ...
1
vote
1
answer
130
views
Polyglot for C and PHP
I was thinking of a compiler that spits out C/PHP polyglots, but not sure if possible. Main issue is the PHP opening/closing brackets, <?php and ?>. I wanted to make them as macros that expand ...
1
vote
0
answers
719
views
how to install polyglot on windows
I would like to use the python polyglot library but I couldn't manage to use it
I installed it using the command
git clone https://github.com/aboSamoor/polyglot
cd polyglot
python setup.py install
...
0
votes
0
answers
312
views
Adding a AWS Lambda between API Gateway and Spring boot
I have a team that has built everything using NodeJS/Typescript. They have specific libraries that are written in typescript that can read the headers the upstream services pass.
However, my service ...
0
votes
0
answers
674
views
unable to install polyglot on windows
i was trying to install polyglot package and i received the following error
i couldn't understand what's the problem any suggestions ?
>pip install polyglot
Collecting polyglot
Using cached ...
0
votes
0
answers
107
views
polyglot - TypeError: 'function' object is not subscriptable
I'm trying to use polyglot nlp package to run sentiment analysis, where I define
def sentiment(text):
senti = Text(text)
pol = senti.polarity
return senti, pol
...
1
vote
1
answer
689
views
GraalVM: How do I import libraries from different languages in a single project? I am using IntelliJ
I have to make some functions that will use different lanaguages (python, R, js).
I got stuck at the part of generating random numbers in Python to initialize a list with random elements. I looked up ...
10
votes
4
answers
8k
views
Pip can't install pyicu
I am running a AWS that runs Ubuntu 20.04. I am trying to install the package pyicu, but I am facing problems. I tried running sudo apt install libicu-dev, but I still can't install pyicu. I am not ...
0
votes
0
answers
770
views
Polyglot error: input contains invalid UTF-8 around byte 333789 (of 361147)
I am using Polyglot to detect English texts, I apply a function on a pandas dataframe but I get error. Here is my code:
def is_english(self, txt):
# try:
wrap = self.detector(txt)
...
2
votes
2
answers
740
views
GraalVM Polyglot: pass arguments from Java to LLVM (C++)
Following the docs I could run Polyglot application where the start language is Java and the target language is C++, which is in a separated source file.
I wonder how could I pass some arguments from ...
1
vote
1
answer
316
views
Graal SDK works when the application runs but fails in unit test
I'm using Graal SDK in order to "translate" an R script to Java code.
The line is compiled and behaves well when the application runs:
Source.newBuilder("R", new File(config....
0
votes
1
answer
2k
views
Graalvm unknown identifier when passing java object to js
I am trying to run this Graalvm sample code:
package org.homi.scripting.experimental;
import org.graalvm.polyglot.*;
import java.nio.file.*;
import static java.nio.file.StandardWatchEventKinds.*;
...
1
vote
0
answers
386
views
How can I install polyglot in Python anaconda?
I want to install polyglot library in python anaconda environment but I can't. Can you help me?
pip install polyglot
My error code:
Complete output (11 lines):
running install
running ...
1
vote
0
answers
155
views
Why polyglot does not return the un-transliterated text back?
eg = 'bajra bechna बाजरा बेचना'
fin=''
text = Text(eg)
for x in text.transliterate("en"):
fin = fin + ' ' + str(x)
print(fin)
output:
बाजरा बेचना
I am loosing the initial English ...
0
votes
1
answer
193
views
IndexError: list index out of range in while using polyglot
Im having issues when using polyglot... is it a bug in polyglot?? Below provided is the codes
import polyglot
from polyglot.downloader import downloader
print(downloader.supported_languages_table(&...
0
votes
0
answers
243
views
Polyglot for Python installed on Windows, but won't run simple test
Polyglot seems installed, but can't run a simple test script from the official documentation.
I am running Python 3.9 on Windows 10 on a 64-bit machine. I used pip (pip install <package>) to ...
1
vote
0
answers
573
views
Polyglot >> error: input contains invalid UTF-8 around byte 35 (of 62)
My code is:
from polyglot.text import Text
def getPolyglotPolarity(text):
return Text(text).polarity
df['PolyPolarity']=df2.apply(getPolyglotPolarity)
df2 is a panda data frame read from a huge ...
3
votes
0
answers
142
views
error installing polyglot package in stack heroku-18 and python3.6.12 runtime
I want to deploy a flask server that is capable of upload files and text pre-processing techniques using packages like spacy, polyglot, etc.
while installing the polyglot package in Heroku(i.e. stack ...
12
votes
2
answers
11k
views
Polyglot ImportError: cannot import name 'Locale' from 'icu'
I was trying to run the polyglot for my sentimental analysis. After a lot of struggling,, I successfully installed Polyglot and pyicu. However when I ran my program, it gave me this error, and I don't ...
1
vote
2
answers
2k
views
GraalVM - Exposing Java complex objects to JavaScript
Using GraalVM, to expose Java objects to JavaScript, I am using ProxyObject to wrap them. For this purpose, I am using ProxyObject.fromMap method like the following:
ProxyObject exposedObject = ...
3
votes
2
answers
866
views
GraalVM JavaScript in Java - How to identify an async method
Consider we have the following JS code:
async function helloAsync(){
return "Hello";
}
function hello(){
return "Hello";
}
In Java, you can load ...
0
votes
1
answer
2k
views
Unicode decode error when installing polyglot
I encountered a problem installing polyglot with pip install polyglot.
I checked the setup.py, the encoding is utf-8, which is supposedly correct for all languages.
I tried changing the encoding to ...
1
vote
1
answer
1k
views
No module named 'polyglot.text'; 'polyglot' is not a package
I am new in python and I am trying to import polyglot module in my code. I have installed polyglot explained in Polyglot Installation, everything went good but it still gives me the same error.
...
0
votes
1
answer
360
views
Graal VM components required for a Node calling Java polyglot application
I planning to GraalVM to merge two (services one using Node and other based on Java) with Node as the main entry point language which calls classes/constructs in Java. I was reading about GraalVM but ...
0
votes
1
answer
257
views
how to override downloader directory with local directory in polyglot in python
I run polyglot sentiment detection. When I upload it to the server I cannot run the downloader.download("TASK:sentiment2") command, so I downloaded the sentiment2 folder and saved it in the ...
1
vote
1
answer
110
views
Polyglot Processor with Local Dataflow Server
I have been trying to work with polyglot and build a simple python processor. I followed the polyglot recipe and I could not get the stream to deploy. I originally deployed the same processor that is ...
1
vote
0
answers
199
views
How to run node.js project with yarn on graalvm?
Which steps should I take to migrate my current yarn project to run on graalvm?
This doc describes a simple start but does not mention yarn, running tests, etc.
1
vote
0
answers
479
views
Send data from Java to C++ Graalvm
I'm working with GraalVM coding in Java and C++ as polyglot code. I have this code to print in C++ with Java:
printMessage.cpp C++ code:
#include <iostream>
int imprimemensaje(std::string s);
...
0
votes
2
answers
5k
views
com.oracle.truffle.polyglot.PolyglotImpl (in unnamed module) cannot access class org.graalvm.polyglot.impl.AbstractPolyglotImpl
I tried to extend scaffolded quarkus demo, https://code.quarkus.io/, with polyglot code for GraalVM:
@GET
@Produces(MediaType.TEXT_PLAIN)
public String hello() {
String out = "From JS:";
...
1
vote
0
answers
734
views
What is the best Python library to get morphemes (including the stem) from a word?
I'm currently using the Polyglot library, however I would to be able to break down words like writing into write and ing. Polyglot is able to break down words like reading successfully into read and ...
0
votes
1
answer
143
views
How can I run this Polyglot token/tag extractor in PyCharm?
I am evaluating various named entity recognition (NER) libraries, and I'm trying out Polyglot.
Everything seems to be going well, but the instructions tell me to use this line in the command prompt:
...
0
votes
1
answer
468
views
How to achieve Polyglot with Prisma, MySQL, neo4j and redis?
I am using Prisma + MySQL in Production. Works great! There's a need in near future where we need to use neo4j alongside/completely. Any suggestions on can we achieve this with the existing artifacts, ...
0
votes
1
answer
362
views
Why doesn't work Polyglot that I installed with git or the wheel files?
I tried install Polyglot module to determine the language like this on Python. But it doesn't work.Are there solution?Or is it possible not to work?My error message is;
ModuleNotFoundError ...
1
vote
3
answers
977
views
What are the best algorithms to determine the language of text and to correct typos in python?
I am looking for algorithms that could tell the language of the text to me(e.g. Hello - English, Bonjour - French, Servicio - Spanish) and also correct typos of the words in english. I have already ...