def get_feature(vector, feature):
<EOL>if feature not in _FEATURE_MASK:<EOL><INDENT>raise AttributeError(<EOL>"<STR_LIT>"<EOL>+ "<STR_LIT>".join(<EOL>(<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>)<EOL>)<EOL>+ "<STR_LIT:'>"<EOL>)<EOL><DEDENT>mask = _FEATURE_MASK[feature]<EOL>pos_mask = mask >> <NUM_LIT:1><EOL>retvec = []<EOL>for char in vector:<EOL><INDENT>if char < <NUM_LIT:0>:<EOL><INDENT>retvec.append(float('<STR_LIT>'))<EOL><DEDENT>else:<EOL><INDENT>masked = char & mask<EOL>if masked == <NUM_LIT:0>:<EOL><INDENT>retvec.append(<NUM_LIT:0>)  <EOL><DEDENT>elif masked == mask:<EOL><INDENT>retvec.append(<NUM_LIT:2>)  <EOL><DEDENT>elif masked & pos_mask:<EOL><INDENT>retvec.append(<NUM_LIT:1>)  <EOL><DEDENT>else:<EOL><INDENT>retvec.append(-<NUM_LIT:1>)  <EOL><DEDENT><DEDENT><DEDENT>return retvec<EOL>
Get a feature vector.

    This returns a list of ints, equal in length to the vector input,
        representing presence/absence/neutrality with respect to a particular
        phonetic feature.

    Parameters
    ----------
    vector : list
        A tuple or list of ints representing the phonetic features of a phone
        or series of phones (such as is returned by the ipa_to_features
        function)
    feature : str
        A feature name from the set:

            - ``consonantal``
            - ``sonorant``
            - ``syllabic``
            - ``labial``
            - ``round``
            - ``coronal``
            - ``anterior``
            - ``distributed``
            - ``dorsal``
            - ``high``
            - ``low``
            - ``back``
            - ``tense``
            - ``pharyngeal``
            - ``ATR``
            - ``voice``
            - ``spread_glottis``
            - ``constricted_glottis``
            - ``continuant``
            - ``strident``
            - ``lateral``
            - ``delayed_release``
            - ``nasal``

    Returns
    -------
    list of ints
        A list indicating presence/absence/neutrality with respect to the
        feature

    Raises
    ------
    AttributeError
        feature must be one of ...

    Examples
    --------
    >>> tails = ipa_to_features('telz')
    >>> get_feature(tails, 'consonantal')
    [1, -1, 1, 1]
    >>> get_feature(tails, 'sonorant')
    [-1, 1, 1, -1]
    >>> get_feature(tails, 'nasal')
    [-1, -1, -1, -1]
    >>> get_feature(tails, 'coronal')
    [1, -1, 1, 1]