The numeration which can be applied to author names. Numeration
    is sometimes found next to authors of papers.
    @return: (string), which can be compiled into a regex; identifies
    numeration next to an author name.
518504
def get_author_affiliation_numeration_str(punct=None):
    

    # FIXME cater for start or end numeration (ie two puncs)

    # Number to look for, either general or specific
    re_number = r'(?:\d\d?)'
    re_chained_numbers = r"(?:(?:[,;]\s*%s\.?\s*))*" % re_number
    # Punctuation surrounding the number, either general or specific again
    if punct is None:
        re_punct = r"(?:[\{\(\[]?)"
    else:
        re_punct = re.escape(punct)

    # Generic number finder (MUST NOT INCLUDE NAMED GROUPS!!!)
    numeration_str = r"""
    (?:\s*(%(punct)s)\s*            ## Left numeration punctuation
        (%(num)s\s*                 ## Core numeration item, either specific or generic
            %(num_chain)s           ## Extra numeration, either generic or empty
        )
        (?:(%(punct)s))       ## Right numeration punctuation
    )""" % {'num': re_number,
            'num_chain': re_chained_numbers,
            'punct': re_punct}
    return numeration_str
650887
public function getAuthor() : ?string 
    {
        if ( ! $this->hasAuthor()) {
            $this->setAuthor($this->getDefaultAuthor());
        }
        return $this->author;
    }
1188277
public String getNucleosideNotation() {
    int linkerLen = getLinkerNotation().length();
    return notation.substring(0, notation.length() - linkerLen);
  }
1237312
def (self):
        
        usage = self.m_doc.strip().split("Usage:")

        if len(usage) > 1:
            usage = "\033[34mUsage:\033[34m" + usage[1]

        return "\n".join(usage.strip().split("\n")[:2]) + "\033[0m"
1101330
def normalized_author(author)

      return "" if author.nil? || author.empty?

      author = author.downcase
      # Just take everything before the comma/semicolon if we have one --
      # or before an "and", for stripping individuals out of 245c
      # multiples. 
      if author =~ /\A([^,;]*)(,|\sand\s|;)/
        author = $1
      end


      author.gsub!(/\A.*by\s*/, '')

      # We want to remove some punctuation that is better
      # turned into a space in the query. Along with
      # any kind of unicode space, why not. 
      author.gsub!(PUNCT_STRIP_REGEX, ' ')

      # compress any remaining whitespace
      author.strip!
      author.gsub!(/\s+/, ' ')

      return author
    end
1274188
protected function AuthorName()
    {
        $author = $this->article->GetAuthor();
        return $author ? $author->GetFirstName() . ' ' . $author->GetLastName() : '';
    }
988570
def get_author(self):
        
        author = self.commit.author

        out = ""
        if author.name is not None:
            out += author.name

        if author.email is not None:
            out += " (" + author.email + ")"

        return out
882349
def _get_hash(self):
        
        if self.optionals and self.optionals.ISBN:
            isbn = self.optionals.ISBN.replace("-", "")

            if len(isbn) <= 10:
                return "97880" + isbn

            return isbn

        if self.optionals and self.optionals.EAN:
            return self.optionals.EAN

        return self.title + ",".join(map(lambda x: x.name, self.authors))
423216
function NUM() {
        var _parser = SEQ(OPT('-'), OR('0', SEQ(RANGE('1', '9'), REPEAT(DIGIT()))), OPT(SEQ('.', REPEAT(DIGIT(), 1))), OPT(SEQ(OR('e', 'E'), OPT(OR('+', '-')), REPEAT(DIGIT(), 1))));

        return _make_alias('NUM', paka.P.NUM, _parser);
    }
687769
public String getLastName() {
    if (AuthorInfo_Type.featOkTst && ((AuthorInfo_Type)jcasType).casFeat_lastName == null)
      jcasType.jcas.throwFeatMissing("lastName", "de.julielab.jules.types.AuthorInfo");
    return jcasType.ll_cas.ll_getStringValue(addr, ((AuthorInfo_Type)jcasType).casFeatCode_lastName);}
1124347
def __getNumberOfRepositories(self, web):
        
        counters = web.find_all('span', {'class': 'Counter'})
        try:
            if 'k' not in counters[0].text:
                self.numberOfRepos = int(counters[0].text)
            else:
                reposText = counters[0].text.replace(" ", "")
                reposText = reposText.replace("\n", "").replace("k", "")

                if reposText and len(reposText) > 1:
                    self.numberOfRepos = int(reposText.split(".")[0]) * \
                        1000 + int(reposText.split(".")[1]) * 100
                elif reposText:
                    self.numberOfRepos = int(reposText.split(".")[0]) * 1000
        except IndexError as error:
            print("There was an error with the user " + self.name)
            print(error)
        except AttributeError as error:
            print("There was an error with the user " + self.name)
            print(error)
643398
protected function num($n)
    {
        if (!is_numeric($n)) {
            return $n;
        }
        $broken_number = explode('.', (string)$n);
        if (isset($broken_number[1])) {
            return number_format($broken_number[0], 0, ',', '.').','.$broken_number[1];
        }
        return number_format($broken_number[0], 0, ',', '.');
    }
1177610
def get_next(self):
        
        self._counter_curr += 1

        suffix = self._separator + "%s" % str(self._counter_curr)

        return self._base_name + suffix
480693
public function getFractionalPart()
    {
        if (0 === $this->exponent || '0' === $this->coefficient) {
            return '0';
        }

        if ($this->exponent > strlen($this->coefficient)) {
            return str_pad($this->coefficient, $this->exponent, '0', STR_PAD_LEFT);
        }

        return substr($this->coefficient, -$this->exponent);
    }
1194632
def parse_author(self, value):
        
        tokens = tuple([t.upper().strip() for t in value.split(',')])
        if len(tokens) == 1:
            tokens = value.split(' ')
        if len(tokens) > 0:
            if len(tokens) > 1:
                aulast, auinit = tokens[0:2]    # Ignore JR, II, III, etc.
            else:
                aulast = tokens[0]
                auinit = ''
        else:
            aulast, auinit = tokens[0], ''
        aulast = _strip_punctuation(aulast).upper()
        auinit = _strip_punctuation(auinit).upper()
        return aulast, auinit
458665
public static String numerize(String str) {
    String numerizedStr = str;
    
    // preprocess
    numerizedStr = Numerizer.DEHYPHENATOR.matcher(numerizedStr).replaceAll("$1 $2"); // will mutilate hyphenated-words but shouldn't matter for date extraction
    numerizedStr = Numerizer.DEHALFER.matcher(numerizedStr).replaceAll("haAlf"); // take the 'a' out so it doesn't turn into a 1, save the half for the end
    
    // easy/direct replacements
    for (DirectNum dn : Numerizer.DIRECT_NUMS) {
      numerizedStr = dn.getName().matcher(numerizedStr).replaceAll(dn.getNumber());
    }
    
    // ten, twenty, etc.
    for (Prefix tp : Numerizer.TEN_PREFIXES) {
      Matcher matcher = tp.getName().matcher(numerizedStr);
      if (matcher.find()) {
        StringBuffer matcherBuffer = new StringBuffer();
        do {
          if (matcher.group(1) == null) {
            matcher.appendReplacement(matcherBuffer, String.valueOf(tp.getNumber()));
          }
          else {
            matcher.appendReplacement(matcherBuffer, String.valueOf(tp.getNumber() + Long.parseLong(matcher.group(1).trim())));
          }
        } while (matcher.find());
        matcher.appendTail(matcherBuffer);
        numerizedStr = matcherBuffer.toString();
      }
    }
    
    // hundreds, thousands, millions, etc.
    for (Prefix bp : Numerizer.BIG_PREFIXES) {
      Matcher matcher = bp.getName().matcher(numerizedStr);
      if (matcher.find()) {
        StringBuffer matcherBuffer = new StringBuffer();
        do {
          if (matcher.group(1) == null) {
            matcher.appendReplacement(matcherBuffer, String.valueOf(bp.getNumber()));
          }
          else {
            matcher.appendReplacement(matcherBuffer, String.valueOf(bp.getNumber() * Long.parseLong(matcher.group(1).trim())));
          }
        } while (matcher.find());
        matcher.appendTail(matcherBuffer);
        numerizedStr = matcherBuffer.toString();
        numerizedStr = Numerizer.andition(numerizedStr);
        // combine_numbers(string) // Should to be more efficient way to do this
      }
    }

    // fractional addition
    // I'm not combining this with the previous block as using float addition complicates the strings
    // (with extraneous .0's and such )
    Matcher matcher = Numerizer.DEHAALFER.matcher(numerizedStr);
    if (matcher.find()) {
      StringBuffer matcherBuffer = new StringBuffer();
      do {
        matcher.appendReplacement(matcherBuffer, String.valueOf(Float.parseFloat(matcher.group(1).trim()) + 0.5f));
      } while (matcher.find());
      matcher.appendTail(matcherBuffer);
      numerizedStr = matcherBuffer.toString();
    }
    //string.gsub!(/(\d+)(?: | and |-)*haAlf/i) { ($1.to_f + 0.5).to_s }

    return numerizedStr;
  }
826881
def getAnalysesNum(self):
        
        an_nums = [0, 0, 0, 0]
        for analysis in self.getAnalyses():
            review_state = analysis.review_state
            if review_state in ['retracted', 'rejected', 'cancelled']:
                continue
            if review_state == 'to_be_verified':
                an_nums[3] += 1
            elif review_state in ['published', 'verified']:
                an_nums[0] += 1
            else:
                an_nums[2] += 1
            an_nums[1] += 1
        return an_nums