naf2conll/naf2conll/util.py
def document_ID_from_filename(filename, extension):
    """
    Extract the document ID (or None) from the base name of a file.
    """
    basename = os.path.basename(filename)
    if basename.endswith(extension):
        return basename[:-len(extension)]
    return None

    Extract the document ID (or None) from the base name of a file.
    
Extract the document ID (or None) from the base name of a file.
Extract the document ID ( or None ) from the base name of a file .
def document_ID_from_filename(filename, extension):
    basename = os.path.basename(filename)
    if basename.endswith(extension):
        return basename[:-len(extension)]
    return None
def document_ID_from_filename ( filename , extension ) : basename = os . path . basename ( filename ) if basename . endswith ( extension ) : return basename [ : - len ( extension ) ] return None
Extract the document ID (or None) from the base name of a file.
Extract the document ID ( or None ) from the base name of a file .
"""
    Extract the document ID (or None) from the base name of a file.
    """
filename
extension