How to use the arxiv.browse.util.author_affil.split_authors function in arxiv

To help you get started, we’ve selected a few arxiv examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github arXiv / arxiv-browse / tests / test_author_affil.py View on Github external
def test_split_authors(self):
        self.assertListEqual(split_authors('Simeon Warner'),
                             ['Simeon Warner'])

        self.assertListEqual(split_authors('The DELPHI Collaboration, J. Abdallah, et al'),
                             ['The DELPHI Collaboration', ',', 'J. Abdallah', ',', 'et al'])

        self.assertListEqual(split_authors('BELLE Collaboration: A Person, Nother Person'),
                             ['BELLE Collaboration', ':', 'A Person', ',', 'Nother Person'])

        self.assertListEqual(split_authors('Simeon Warner, Herbert Van de Sompel'),
                             ['Simeon Warner', ',', 'Herbert Van de Sompel'])

        self.assertListEqual(
            split_authors('An Author'),
            ['An Author'],
            'single author'
        )

        self.assertListEqual(
            split_authors(''),
github arXiv / arxiv-browse / tests / test_author_affil.py View on Github external
['The DELPHI Collaboration', ',', 'J. Abdallah', ',', 'et al'])

        self.assertListEqual(split_authors('BELLE Collaboration: A Person, Nother Person'),
                             ['BELLE Collaboration', ':', 'A Person', ',', 'Nother Person'])

        self.assertListEqual(split_authors('Simeon Warner, Herbert Van de Sompel'),
                             ['Simeon Warner', ',', 'Herbert Van de Sompel'])

        self.assertListEqual(
            split_authors('An Author'),
            ['An Author'],
            'single author'
        )

        self.assertListEqual(
            split_authors(''),
            [],
            'empty author'
        )

        self.assertListEqual(
            split_authors('An Author (affil)'),
            ['An Author', '(affil)'],
            'single author with affil'
        )
        self.assertListEqual(
            split_authors('An Author     (affil)'),
            ['An Author', '(affil)'],
            'single author with affil'
        )
        self.assertListEqual(
            split_authors('An Author and Another P. H. J. Author (affil)'),
github arXiv / arxiv-browse / tests / test_author_affil.py View on Github external
'single author with affil'
        )
        self.assertListEqual(
            split_authors('An Author and Another P. H. J. Author (affil)'),
            ['An Author', ',', 'Another P. H. J. Author', '(affil)'],
            'double author with affil'
        )
        self.assertListEqual(
            split_authors(
                'John Von Neumann, Herbert Van de Sompel, Fred Bloggs, Jr, et al'),
            ['John Von Neumann', ',', 'Herbert Van de Sompel',
             ',', 'Fred Bloggs, Jr', ',', 'et al'],
            'multiple with prefixes and suffixes'
        )
        self.assertListEqual(
            split_authors('sum won ( whatever affil  data   unmunged  )'),
            ['sum won', '( whatever affil data unmunged )'],
            'one author, two labs'
        )
        self.assertListEqual(
            split_authors('sum won(1,2)((1)lab a,(2)lab b)'),
            ['sum won', '(1,2)', '((1)lab a,(2)lab b)'],
            'one author, two labs'
        )
github arXiv / arxiv-browse / tests / test_author_affil.py View on Github external
['Simeon Warner', ',', 'Herbert Van de Sompel'])

        self.assertListEqual(
            split_authors('An Author'),
            ['An Author'],
            'single author'
        )

        self.assertListEqual(
            split_authors(''),
            [],
            'empty author'
        )

        self.assertListEqual(
            split_authors('An Author (affil)'),
            ['An Author', '(affil)'],
            'single author with affil'
        )
        self.assertListEqual(
            split_authors('An Author     (affil)'),
            ['An Author', '(affil)'],
            'single author with affil'
        )
        self.assertListEqual(
            split_authors('An Author and Another P. H. J. Author (affil)'),
            ['An Author', ',', 'Another P. H. J. Author', '(affil)'],
            'double author with affil'
        )
        self.assertListEqual(
            split_authors(
                'John Von Neumann, Herbert Van de Sompel, Fred Bloggs, Jr, et al'),
github arXiv / arxiv-browse / tests / test_author_affil.py View on Github external
def test_split_authors(self):
        self.assertListEqual(split_authors('Simeon Warner'),
                             ['Simeon Warner'])

        self.assertListEqual(split_authors('The DELPHI Collaboration, J. Abdallah, et al'),
                             ['The DELPHI Collaboration', ',', 'J. Abdallah', ',', 'et al'])

        self.assertListEqual(split_authors('BELLE Collaboration: A Person, Nother Person'),
                             ['BELLE Collaboration', ':', 'A Person', ',', 'Nother Person'])

        self.assertListEqual(split_authors('Simeon Warner, Herbert Van de Sompel'),
                             ['Simeon Warner', ',', 'Herbert Van de Sompel'])

        self.assertListEqual(
            split_authors('An Author'),
            ['An Author'],
            'single author'
        )

        self.assertListEqual(
            split_authors(''),
            [],
            'empty author'
        )

        self.assertListEqual(
            split_authors('An Author (affil)'),
            ['An Author', '(affil)'],
            'single author with affil'
        )
        self.assertListEqual(
github arXiv / arxiv-browse / tests / test_author_affil.py View on Github external
def test_split_authors(self):
        self.assertListEqual(split_authors('Simeon Warner'),
                             ['Simeon Warner'])

        self.assertListEqual(split_authors('The DELPHI Collaboration, J. Abdallah, et al'),
                             ['The DELPHI Collaboration', ',', 'J. Abdallah', ',', 'et al'])

        self.assertListEqual(split_authors('BELLE Collaboration: A Person, Nother Person'),
                             ['BELLE Collaboration', ':', 'A Person', ',', 'Nother Person'])

        self.assertListEqual(split_authors('Simeon Warner, Herbert Van de Sompel'),
                             ['Simeon Warner', ',', 'Herbert Van de Sompel'])

        self.assertListEqual(
            split_authors('An Author'),
            ['An Author'],
            'single author'
        )

        self.assertListEqual(
            split_authors(''),
            [],
            'empty author'
        )

        self.assertListEqual(
            split_authors('An Author (affil)'),
github arXiv / arxiv-browse / tests / test_author_affil.py View on Github external
'double author with affil'
        )
        self.assertListEqual(
            split_authors(
                'John Von Neumann, Herbert Van de Sompel, Fred Bloggs, Jr, et al'),
            ['John Von Neumann', ',', 'Herbert Van de Sompel',
             ',', 'Fred Bloggs, Jr', ',', 'et al'],
            'multiple with prefixes and suffixes'
        )
        self.assertListEqual(
            split_authors('sum won ( whatever affil  data   unmunged  )'),
            ['sum won', '( whatever affil data unmunged )'],
            'one author, two labs'
        )
        self.assertListEqual(
            split_authors('sum won(1,2)((1)lab a,(2)lab b)'),
            ['sum won', '(1,2)', '((1)lab a,(2)lab b)'],
            'one author, two labs'
        )
github arXiv / arxiv-browse / tests / test_author_affil.py View on Github external
'single author'
        )

        self.assertListEqual(
            split_authors(''),
            [],
            'empty author'
        )

        self.assertListEqual(
            split_authors('An Author (affil)'),
            ['An Author', '(affil)'],
            'single author with affil'
        )
        self.assertListEqual(
            split_authors('An Author     (affil)'),
            ['An Author', '(affil)'],
            'single author with affil'
        )
        self.assertListEqual(
            split_authors('An Author and Another P. H. J. Author (affil)'),
            ['An Author', ',', 'Another P. H. J. Author', '(affil)'],
            'double author with affil'
        )
        self.assertListEqual(
            split_authors(
                'John Von Neumann, Herbert Van de Sompel, Fred Bloggs, Jr, et al'),
            ['John Von Neumann', ',', 'Herbert Van de Sompel',
             ',', 'Fred Bloggs, Jr', ',', 'et al'],
            'multiple with prefixes and suffixes'
        )
        self.assertListEqual(
github arXiv / arxiv-browse / tests / test_author_affil.py View on Github external
def test_split_authors(self):
        self.assertListEqual(split_authors('Simeon Warner'),
                             ['Simeon Warner'])

        self.assertListEqual(split_authors('The DELPHI Collaboration, J. Abdallah, et al'),
                             ['The DELPHI Collaboration', ',', 'J. Abdallah', ',', 'et al'])

        self.assertListEqual(split_authors('BELLE Collaboration: A Person, Nother Person'),
                             ['BELLE Collaboration', ':', 'A Person', ',', 'Nother Person'])

        self.assertListEqual(split_authors('Simeon Warner, Herbert Van de Sompel'),
                             ['Simeon Warner', ',', 'Herbert Van de Sompel'])

        self.assertListEqual(
            split_authors('An Author'),
            ['An Author'],
            'single author'
        )
github arXiv / arxiv-browse / tests / test_author_affil.py View on Github external
split_authors('An Author (affil)'),
            ['An Author', '(affil)'],
            'single author with affil'
        )
        self.assertListEqual(
            split_authors('An Author     (affil)'),
            ['An Author', '(affil)'],
            'single author with affil'
        )
        self.assertListEqual(
            split_authors('An Author and Another P. H. J. Author (affil)'),
            ['An Author', ',', 'Another P. H. J. Author', '(affil)'],
            'double author with affil'
        )
        self.assertListEqual(
            split_authors(
                'John Von Neumann, Herbert Van de Sompel, Fred Bloggs, Jr, et al'),
            ['John Von Neumann', ',', 'Herbert Van de Sompel',
             ',', 'Fred Bloggs, Jr', ',', 'et al'],
            'multiple with prefixes and suffixes'
        )
        self.assertListEqual(
            split_authors('sum won ( whatever affil  data   unmunged  )'),
            ['sum won', '( whatever affil data unmunged )'],
            'one author, two labs'
        )
        self.assertListEqual(
            split_authors('sum won(1,2)((1)lab a,(2)lab b)'),
            ['sum won', '(1,2)', '((1)lab a,(2)lab b)'],
            'one author, two labs'
        )