Comments (8)
I think, the confusion here comes from whether the present or past tense is used. Personally I use the past tense, hence: a deprecedated word is no more valid because of its deprecated status. Though, it was a recommended word, in the last supported version of UCDList-x.y.
I may be wrong. It is true that a deprecated word is an old IVOA recommended world and is grammatically valid and recognised (so I should probably fix this last point). But I am not sure it is still a recommended word....it is actually recommended to not use it anymore.
What makes more sense according to you?
Anyway, I am confused by your interpretation of ! pucd.isAllRecommended()
. If you define and use your own UCD words (so, not IVOA official words), they are flagged as not recommended, but that does not mean they are deprecated.
from ucidy.
You are right that my pucd.isAllRecommended()
is wrong, I was trying to come up with something that would report deprecated words, but doing it badly.
I agree that deprecated words should not be recommended.
I was mostly confused by deprecated words not being recognised. If that gets resolved, then I can identify deprecated as (recognised && !recommended) - do you agree? - and do everything that I want. (In the mean time I'm checking for the string "DEPRECATED
" in the error message, which seems to do the trick, so this fix is not urgent for me).
from ucidy.
I can identify deprecated as (recognised && !recommended) - do you agree?
No, sorry :-( For a UCD word officially defined by the IVOA (UCDList-x.y), this condition is enough. However, it is possible to define its own custom UCD words. So, a custom UCD word is recognised but not recommended (by the IVOA). It does not make it necessarily a deprecated word.
Actually, for what you want to achieve, I think you need a new function: something like UCD.containsDeprecated()
or UCD.listDeprecated()
. Any of these can anyway easily be reproduced as you have the list of UCDWord
s (cf UCD.iterator()
). From this, you can inspect each UCDWord
and know if one is deprecated or not (UCDWord.isDeprecated()
). If you want, I can add either containsDeprecated()
or listDeprecated()
(or both).
from ucidy.
In the mean time I'm checking for the string "
DEPRECATED
" in the error message, which seems to do the trick, so this fix is not urgent for me
This DEPRECATED
message comes actually from the detection of a UCDWord.isDeprecated()
item in a UCD
instance.
from ucidy.
Got it. Using UCDWord.isDeprecated()
is fine for me, I was looking in the wrong place for this functionality (the UCD
instead of the UCDWord
). Thank you!
from ucidy.
Ok :)
Having a containsDeprecated()
or listDeprecated()
in UCD
, would it be also interesting?
from ucidy.
It would fit in with the other UCD
-level methods isAllRecommended
, isAllValid
etc; but I've written the code to work with the UCDWord
-level method now, so I probably won't use them.
from ucidy.
FYI, I just added the followings functions in UCD
:
containsDeprecated()
countDeprecated()
getDeprecated()
from ucidy.
Related Issues (8)
- Update official list of UCD1+ with version 1.3 HOT 1
- UCDlist 1.4 update HOT 6
- non-public UCDParser.defaultParser HOT 1
- Classpath "." HOT 2
- stderr output HOT 2
- Text resource file locations HOT 2
- UCD list version reporting HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ucidy.