Closed albertovilla closed 3 years ago
I have also tried the approach which appears in nnsplit/bindings/python/tests/test_nnsplit.py
and it gives a similar error:
import nnsplit
model = nnsplit.NNSplit.load("en")
splits = model.split(["This is a test This is another test."])[0]
for sentence in splits:
print(sentence)
The error is:
model = nnsplit.NNSplit.load("en")
AttributeError: partially initialized module 'nnsplit' has no attribute 'NNSplit' (most likely due to a circular import)
Hi, thanks for the issue!
I believe the problem is that the file is named nnsplit.py
, can you try renaming it? I just tried using numpy in a file called numpy.py
and get the same error, so I don't think this is a bug in nnsplit.
Hi Benajamin, I think that was an issue on my side... I put that name on the file temporarily and I didn't change it :) Now, the example works, thanks a lot.
Hi, I was trying the simple example in Python from the documentation and I'm getting an
ImportError
:When executing this example I'm getting the following error:
I have installed the packages in a new conda environment, executing
pip list installed
I have: