Repository: acl-org/acl-anthology

Issue:
DOI minting for 2019 publications
Thanks for all the work that goes into maintaining the ACL Anthology.  It's really an incredible resource.

I saw the open issues for generating DOIs for 2018 publications (#435, #435), but I wanted to open one for NAACL 2019 (N19) as well.


Discussion:
After trying a few URLs, I believe the scope of the issue is broader.  It appears DOIs need to be created for all 2019 publications: 
- [x] [CL19](https://aclweb.org/anthology/events/cl-2019/)
- [x] [NAACL19](https://aclweb.org/anthology/events/naacl-2019/)
- [x] [SEMEVAL19](https://aclweb.org/anthology/events/semeval-2019/)
- [x] [TACL19](https://aclweb.org/anthology/events/tacl-2019/)
- [x] [WS19](https://aclweb.org/anthology/events/ws-2019/)
Hi Gus:

Thanks for this.  The DOI process is under revamp and we hope to have the
DOIs worked out soon.  Thanks for letting us know.


On Sun, Jul 7, 2019 at 2:31 AM Gus Hahn-Powell <notifications@github.com>
wrote:

> After trying a few URLs, I believe the scope of the issue is broader. It
> appears DOIs need to be created for all 2019 publications:
>
>    - CL19 <https://aclweb.org/anthology/events/cl-2019/>
>    - NAACL19 <https://aclweb.org/anthology/events/naacl-2019/>
>    - SEMEVAL19 <https://aclweb.org/anthology/events/semeval-2019/>
>    - TACL19 <https://aclweb.org/anthology/events/tacl-2019/>
>    - WS19 <https://aclweb.org/anthology/events/ws-2019/>
>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
> <https://github.com/acl-org/acl-anthology/issues/452?email_source=notifications&email_token=AABU72ZXEDBS4W63XTKY2ZTP6DQJNA5CNFSM4H6T7XMKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZK6KHY#issuecomment-508945695>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AABU722P4MT4N5EHNM6Y4O3P6DQJNANCNFSM4H6T7XMA>
> .
>

Looking more closely, CL19 and TACL19 have DOIs assigned externally by their publisher (MIT Press).  So it is just the workshops and NAACL and SEMEVAL.  @mjpost any others missing?
I think that's all so far, though ACL will be up in a week. We have to be careful with workshops, because not all of them are ACL.

I'm working on a small change to your PR #448, will commit soon and we should be ready!
I will try to run the script that I have to refactor to add the URLs for DOIs for 2019 for [MS]19.xml.  @mjpost: For W19.xml is the public Google Sheet still the authoritative source?
Yes.
Submitted and registered DOIs for [NS]19.xml and NAACL Workshops W19-{13..30}.xml.

Updated dates in the Google sheet for W19-{13..30}.xml.  @mjpost : no current entries for ingestion of N19-[12345].xml and S19-[12].xml, so not documenting.
Awesome!
Feel free to create entries. I haven’t given management of all of that enough thought and the spreadsheet is a good place. 
@knmnyn, are you going to ingest the 2019 DOIs now that you've created them, or should I do that?
I’ve run into some problems with the script. I will try to commit some that
were successful first.

On Thu, 25 Jul 2019 at 03:29, Matt Post <notifications@github.com> wrote:

> @knmnyn <https://github.com/knmnyn>, are you going to ingest the 2019
> DOIs now that you've created them, or should I do that?
>
> —
> You are receiving this because you were mentioned.
>
>
> Reply to this email directly, view it on GitHub
> <https://github.com/acl-org/acl-anthology/issues/452?email_source=notifications&email_token=AABU723GGVEX2QKY2BIV34LQBCURTA5CNFSM4H6T7XMKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2XLZDI#issuecomment-514768013>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AABU72ZDWWW3B5TROWWLJQLQBCURTANCNFSM4H6T7XMA>
> .
>
-- 
- M


Resolving patch:
diff --git a/bin/anthology/utils.py b/bin/anthology/utils.py
--- a/bin/anthology/utils.py
+++ b/bin/anthology/utils.py
@@ -82,17 +82,17 @@ def deconstruct_anthology_id(anthology_id):
         P18-1 -> ('P18', '1', None)
         W18-63 -> ('W18', '63', None)
     """
-    collection_id, rest = anthology_id.split('-')
-    if collection_id.startswith('W') or collection_id.startswith('C69'):
-        if (len(rest) >= 2):
-            return (collection_id, str(int(rest[0:2])), str(int(rest[2:])))
+    tokens = anthology_id.split('-')
+    if anthology_id.startswith('W') or anthology_id.startswith('C69'):
+        if len(tokens) == 3:
+            return (tokens[0], str(int(tokens[1])), str(int(tokens[2])))
         else:                   # Possible Volume only identifier
-            return (collection_id, str(int(rest[0:2])), None)
+            return (tokens[0], str(int(tokens[1])), None)
     else:
-        if (len(rest) >= 2):
-            return (collection_id, str(int(rest[0:1])), str(int(rest[1:])))
+        if len(tokens) == 3:
+            return (tokens[0], str(int(tokens[1])), str(int(tokens[2])))
         else:                   # Possible Volume only identifier
-            return (collection_id, str(int(rest[0:1])), None)
+            return (tokens[0], str(int(tokens[1])), None)
 
 
 def stringify_children(node):


Test patch: