Craig Macdonald

Results 56 issues of Craig Macdonald

``` Arrays = autoclass("java.util.Arrays") Collectors = autoclass("java.util.stream.Collectors") #works fine #words = Arrays.asList("1", "2") #segfaults numbers = Arrays.asList(1, 2) ``` Arrays.asList() uses varargs and a generic type

I have a slight problem: I'm trying to instantiate a class that is have a java.lang.Class reference to. This was provided by a ClassLoader accessing a classpath different from "boot...

Google's colab has two confusing things about its java setup: - firstly, there are two different version of java installed: openjdk8 and openjdk11 - two, javac and java point to...

I have tried to implement the example of https://pyjnius.readthedocs.io/en/stable/api.html#jnius.JavaField ```python class System(JavaClass): __javaclass__ = 'java/lang/System' out = JavaField('()Ljava/io/InputStream;', static=True) ``` If I then do `System().out`, I get: ``` test_export_class.py:31: E...

``` os=autoclass('java.lang.System').out os = cast('java.io.OutputStream', os) ``` produces: ``` 1 os=autoclass('java.lang.System').out ----> 2 os = cast('java.io.OutputStream', os) jnius/jnius_export_func.pxi in jnius.cast() TypeError: __init__() got an unexpected keyword argument 'noinstance' ``` I...

We can construct Python implementations of Java interfaces using PythonJavaClass. We can put them into arrays, using a Python list comprehension, or by instantiating java.lang.reflect.Array (both seem to be equivalent)...

optionally, export ids during tokenisation

The aim of this PR is to expose a lower-level indexing API, which allows client code to directly provide the indexed representation of documents. This will primarily be exposed in...

enhancement
pyterrier

See https://github.com/terrier-org/pyterrier/issues/294

pyterrier