Closed jcklie closed 3 years ago
This is biting me right now, as well. Is there any progress towards this?
I can add it soonish, I hope this weekend.
Holy smokes, that's soon. Really appreciate it.
On May 1, 2020 12:24:13 PM EDT, Jan-Christoph Klie notifications@github.com wrote:
I can add it soonish, I hope this weekend.
-- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/dkpro/dkpro-cassis/issues/25#issuecomment-622456811
-- Sent from my Android device with K-9 Mail. Please excuse my brevity.
@triclops200 Can you elaborate a bit what problem was caused by missing this feature?
Trying to enforce that users of a library I'm writing that interfaces with another system don't add items that aren't the correct subtype to a fslist
On May 2, 2020 1:45:21 PM EDT, Jan-Christoph Klie notifications@github.com wrote:
@triclops200 Can you elaborate a bit what problem was caused by missing this feature?
-- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/dkpro/dkpro-cassis/issues/25#issuecomment-622989728
-- Sent from my Android device with K-9 Mail. Please excuse my brevity.
Is it enough for you now to check for type safety only when the user adds the the fs with contains a fslist to the CAS? Or is it enough for you to check when serializing? Checking whenever the user mutates the list is a bit more complicated.
Checking on those points would be fine. If it becomes a problem I'll make a pull request myself in the future.
On May 2, 2020 5:33:15 PM EDT, Jan-Christoph Klie notifications@github.com wrote:
Is it enough for you now to check for type safety only when the user adds the the fs with contains a fslist to the CAS? Or is it enough for you to check when serializing? Checking whenever the user mutates the list is a bit more complicated.
-- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/dkpro/dkpro-cassis/issues/25#issuecomment-623016124
-- Sent from my Android device with K-9 Mail. Please excuse my brevity.
In a feature branch, I added a function cas.typecheck()
that returns a list of type checking errors. You can call the function whenever you want. Right now, I only check whether fs list members are type sound. Is that enough for you?
More than enough! Thanks!
On May 3, 2020 8:57:07 AM EDT, Jan-Christoph Klie notifications@github.com wrote:
In a feature branch, I added a function
cas.typecheck()
that returns a list of type checking errors. You can call the function whenever you want. Right now, I only check whether fs list members are type sound. Is that enough for you?-- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/dkpro/dkpro-cassis/issues/25#issuecomment-623106171
-- Sent from my Android device with K-9 Mail. Please excuse my brevity.
I added the typ check method to master, you may want to try it out. You can just use the master via pip using python -m pip install git+https://github.com/dkpro/dkpro-cassis
. I will make a release soonish. Will you library be open soure or is it something internal?
Internal, unfortunately. Thanks for the quick response.
On May 3, 2020 11:25:52 AM EDT, Jan-Christoph Klie notifications@github.com wrote:
I added the typ check method to master, you may want to try it out. You can just use the master via pip using
python -m pip install git+https://github.com/dkpro/dkpro-cassis
. I will make a release soonish. Will you library be open soure or is it something internal?-- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/dkpro/dkpro-cassis/issues/25#issuecomment-623126912
-- Sent from my Android device with K-9 Mail. Please excuse my brevity.
Should be working now
Right now, the CAS is not aware of the type system. That means, it is possible to add types to a CAS that are not in the type system. It should be the default to validate types to allow only adding types that are in the type system.