Return a list of unique Identifier strings
    This populates the Identifiers Keyword index, but with some
    replacements to prevent the word-splitter etc from taking effect.
554173
def IdentifiersIndexer(instance):
    
    identifiers = instance.Schema()['Identifiers'].get(instance)
    return [safe_unicode(i['Identifier']) for i in identifiers]
1238396
def get(self, identifier, default=None):
        
        split_label = (tuple(identifier.split('.'))
                       if isinstance(identifier, str) else tuple(identifier))
        if len(split_label) == 1:
            identifier = split_label[0]
            return self.__dict__.get(identifier, default)
        path_item = self
        for identifier in split_label:
            if path_item == default or path_item is None:
                return default
            path_item = path_item.get(identifier, default)
        return path_item
849274
public Collection<String> getIdentifiers() {
    List<String> keys = new LinkedList<String>();
    keys.addAll(this.stateMap.keySet());
    return keys;
  }
774593
def _escape_identifiers(self, item):
        
        if self._escape_char == '':
            return item

        for field in self._reserved_identifiers:
            if item.find('.%s' % field) != -1:
                _str = "%s%s" % (self._escape_char, item.replace('.', '%s.' % self._escape_char))
                # remove duplicates if the user already included the escape
                return re.sub(r'[%s]+'%self._escape_char, self._escape_char, _str)

        if item.find('.') != -1:
            _str = "%s%s%s" % (self._escape_char, item.replace('.', '%s.%s'%(self._escape_char, self._escape_char)),
            self._escape_char)
        else:
            _str = self._escape_char+item+self._escape_char
        # remove duplicates if the user already included the escape
        return re.sub(r'[%s]+'%self._escape_char, self._escape_char, _str)
1051570
def get_keywords(lexer):
    
    if not hasattr(lexer, 'tokens'):
        return []
    if 'keywords' in lexer.tokens:
        try:
            return lexer.tokens['keywords'][0][0].words
        except:
            pass
    keywords = []
    for vals in lexer.tokens.values():
        for val in vals:
            try:
                if isinstance(val[0], words):
                    keywords.extend(val[0].words)
                else:
                    ini_val = val[0]
                    if ')\\b' in val[0] or ')(\\s+)' in val[0]:
                        val = re.sub(r'\\.', '', val[0])
                        val = re.sub(r'[^0-9a-zA-Z|]+', '', val)
                        if '|' in ini_val:
                            keywords.extend(val.split('|'))
                        else:
                            keywords.append(val)
            except Exception:
                continue
    return keywords
15102
def ids(args):
    
    p = OptionParser(ids.__doc__)
    p.add_option("--prefix", type="int",
                 help="Find rep id for prefix of len [default: %default]")
    opts, args = p.parse_args(args)

    if len(args) != 1:
        sys.exit(not p.print_help())

    clstrfile, = args
    cf = ClstrFile(clstrfile)
    prefix = opts.prefix
    if prefix:
        reads = list(cf.iter_reps_prefix(prefix=prefix))
    else:
        reads = list(cf.iter_reps())

    nreads = len(reads)
    idsfile = clstrfile.replace(".clstr", ".ids")
    fw = open(idsfile, "w")
    for i, name in reads:
        print("\t".join(str(x) for x in (i, name)), file=fw)

    logging.debug("A total of {0} unique reads written to `{1}`.".\
            format(nreads, idsfile))
    fw.close()

    return idsfile
383542
@Override
	protected Set<String> getInheritanceIdentifiers() {

		final Set<String> identifiers = new HashSet<>();

		identifiers.add("rdfs:subClassOf");
		identifiers.add("rdfs:subPropertyOf");

		return identifiers;
	}
978933
def get_uniques(l):
    
    result = []

    for i in l:
        if i not in result:
            result.append(i)

    return result
915399
def identifier(self):
        
        if self.primary_key not in self._data:
            return 'Unknown'
        return str(self._data[self.primary_key])
238620
def tokens2ids(tokens: Iterable[str], vocab: Dict[str, int]) -> List[int]:
    
    return [vocab.get(w, vocab[C.UNK_SYMBOL]) for w in tokens]
484422
private String listIndexes(Set<IndexInfo> is) {
    if (Util.isEmpty(is)) {
      return "No indexes found";
    }

    StringBuilder res = new StringBuilder("Indexes");

    res.append("------------------------\n");

    for (IndexInfo ii: is) {
      res.append(ii.getIndexName());

      if (!Util.isEmpty(ii.getAliases())) {
        String delim = "<----";

        for (String a: ii.getAliases()) {
          res.append(delim);
          res.append(a);
          delim = ", ";
        }
      }

      res.append("\n");
    }

    return res.toString();
  }
1266524
def get_unique_sentence_indices( text ):
    '''  '''
    # Add sentence annotation (if missing)
    if not text.is_tagged( SENTENCES ):
        text.tokenize_sentences()
    # Collect (unique) sent indices over the whole text
    sent_indices = []
    sent_id = 0
    for sub_text in text.split_by( SENTENCES ):
        for word in sub_text.words:
            sent_indices.append( sent_id )
        sent_id += 1
    assert len(sent_indices) == len(text.words), '(!) Number of sent indices should match nr of words!'
    return sent_indices
988962
private static int getIndex(String identifier, String subIdentifier) {
		int position = identifier.indexOf(subIdentifier);
		if (position > 0) {
			String temp = identifier.substring(position + (subIdentifier.length()));
			return readInteger(temp);
		}
		return -1;
	}
1104839
def _get_matching_dns_entry_ids(self, identifier=None, rtype=None,
                                    name=None, content=None):
        """"""
        record_ids = []
        if not identifier:
            records = self._list_records(rtype, name, content)
            record_ids = [record['id'] for record in records]
        else:
            record_ids.append(identifier)
        return record_ids
489006
def ids2strids(ids: Iterable[int]) -> str:
    
    return C.TOKEN_SEPARATOR.join(map(str, ids))
1205944
def keyword(self) -> Tuple[Optional[str], str]:
        
        i1 = self.yang_identifier()
        if self.peek() == ":":
            self.offset += 1
            i2 = self.yang_identifier()
            return (i1, i2)
        return (None, i1)
1177209
public StringIdentifierGenerator[] getIdentifierGenerators() {
        int len = identifierGenerators.length;
        StringIdentifierGenerator[] out = 
            new StringIdentifierGenerator[len];
        System.arraycopy(identifierGenerators, 0, out, 0, len);
        return out;
    }