Open cicada0007 opened 1 year ago
Generally these changes look ok, @cicada0007, but the tests are failing as you can see. I think that one of your changes isn't valid as 18 tests are now failing. Could you take a look at this and get back to me when you have an idea of what's wrong? Or would you prefer that I look into this?
Thanks again!
hey @andrewtavis Thank you noticing the error I will look into it If any help needed to me I will ask you
Thank you for checking this, @cicada0007!
hi @andrewtavis
Can you help me with locating error so that i can fix it
I tried but there are 2000 lines of code so you can help me with it
@cicada0007, can you let me know what your Python version is? I'm thinking I'm going to update kwx to run on 3.8+ :) I might just merge this as the changes do look good, and then I can figure out the conflicts on my end.
@andrewtavis My current version of python is Python 3.11.3
Thank you, @cicada0007. I figured as much :) kwx
being written years ago, it makes sense that some changes seem like they’re working for you and then aren’t in the repo. I’ll again merge this at some point soon and go through to update the package to work with higher Python versions. Thing is that the SpaCy check wouldn’t be needed as we’ll only be above a certain version 🤔 I’ll verify this and remove the check if so 😊
If you have interest in helping with the update, then let me know. I did an initial update and test last night and to be expected there are lots of failures, but it seems like what needs to happen is that the test targets needs to be switched as the random seeds are behaving differently at this point :) So when we’re checking that the output of a model is a list of strings that’s always the same, it now needs to be different ones given that the random number generator behind the output is slightly different :)
Ya that's correct
Ok, @cicada0007 :) As I said I’ll merge this soon and try to figure the updates out.
1 st changes
spacy_version
variable is used to store the version of theSpaCy
library. Inside the loop, the code checks whether theSpaCy
version is 3.0.0 or higher. If it is, the lemmatization is performed usingnlp(combined_texts)
. Otherwise, for older versions, the lemmatization is done usingnlp.tokenizer(combined_texts)
. This change accounts for potential differences inSpaCy
versions and ensures the code can handle them correctly.47 Edit spaCy
2 nd changes