Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve splitting lists of copyright holders #3916

Open
pombredanne opened this issue Sep 12, 2024 · 0 comments
Open

Improve splitting lists of copyright holders #3916

pombredanne opened this issue Sep 12, 2024 · 0 comments

Comments

@pombredanne
Copy link
Contributor

With:

        (c) 1999                Terrehon Bowden <terrehon@pacbell.net>
                                Bodo Bauer <bb@ricochet.net>

we get

       copyrights:
           -   copyright: (c) 1999 Terrehon Bowden <terrehon@pacbell.net> Bodo Bauer <bb@ricochet.net>
       holders:
           -   holder: Terrehon Bowden Bodo Bauer

ideally we should get this instead

       holders:
           -   holder: Terrehon Bowden
           -   holder: Bodo Bauer

The parse tree looks like this, so we have distinct name groups to guide splitting:

(label='ROOT', children=(
    (label='COPYRIGHT', children=(
        (label='COPY', value='(c)')
        (label='NAME-YEAR', children=(
            (label='NAME-YEAR', children=(
                (label='NAME-YEAR', children=(
                    (label='YR-RANGE', children=(
                        (label='YR-RANGE', children=(
                            (label='YR', value='1999')
                        ))
                    ))
                    (label='NNP', value='Terrehon')
                    (label='NNP', value='Bowden')
                ))
            ))
        ))
        (label='NAME-EMAIL', children=(
            (label='NAME', children=(
                (label='EMAIL', value='<terrehon@pacbell.net>')
                (label='NAME', children=(
                    (label='NNP', value='Bodo')
                    (label='NNP', value='Bauer')
                ))
            ))
            (label='EMAIL', value='<bb@ricochet.net>')
        ))
    ))
))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant