ontaining only unclassified terms, and the number of times they occur
    &#34;&#34;&#34;
    import pathlib
    
    
    if isinstance(outdir, pathlib.PurePath):
        if not outdir.is_dir() or not outdir.exists():
            print(&#39;Please specify a valid directory for export. Filename is generated automatically.&#39;)
            return
        outdir = outdir.as_posix()
    else:
        outdir.replace(&#39;\\&#39;,&#39;/&#39;)
        outdir.replace(&#39;\\&#39;[-1], &#39;/&#39;)

    #Get direc