file_word_count   xtlang


Defined in:  https://github.com/digego/extempore/tree/v0.8.9/examples/contrib/word_count.xtm

Implementation

(bind-func file_word_count
  (lambda (filename)
    (letz
        ((buflen 1000000000)
         (buf:i8* (halloc buflen))
         (wc_dict null))
      (if (> (fill_buffer_with_file buf filename buflen) 0)
          (begin (set! wc_dict (word_count (String buf) (String " ,.\t\n")))
                 void))
      (free buf)
      (println "length:" (length wc_dict))
      (println (take wc_dict 100))
      (if (null? wc_dict) wc_dict (cdr wc_dict)))))


Back to Index

Similar Entries

  • aiProcess_SplitByBoneCount    scheme
  • analogue_remove_file    xtlang
  • audiofile_16bitPCM_to_sample_be    xtlang
  • audiofile_16bitPCM_to_sample_le    xtlang
  • audiofile_24bitPCM_to_sample_be    xtlang
  • audiofile_24bitPCM_to_sample_le    xtlang
  • audiofile_aiff_read_samples    xtlang
  • audiofile_copy_samples    xtlang
  • audiofile_float_to_sample_be    xtlang
  • audiofile_float_to_sample_le    xtlang
  • audiofile_read_samples    xtlang
  • audiofile_wave_read_samples    xtlang
  • call-with-input-file    scheme
  • call-with-output-file    scheme
  • cell_count_neighbors    xtlang
  • cerberus_remove_file    xtlang
  • file->string    scheme
  • file-exists?    scheme
  • file_size    xtlang
  • filename-from-path    scheme
  • filename-strip-extension    scheme
  • fill_buffer_with_file    xtlang
  • fits-file-print    xtlang
  • fits-file-print    xtlang
  • fits-open-file    xtlang
  • fits-open-file    xtlang
  • get_file_name    xtlang
  • get_frame_count    xtlang
  • glfw_set_compatibility_profile    xtlang
  • glfw_set_core_profile    xtlang
  • impc:aot:compile-xtm-file    scheme
  • impc:ti:word-downcase    scheme
  • impc:ti:word-upcase    scheme
  • pm_count_devices    xtlang
  • sampler-parse-filename    scheme
  • sampler-parse-midinote-filename    scheme
  • sampler-parse-spn-filename    scheme
  • sf_channels_from_file    xtlang
  • sf_frames_from_file    xtlang
  • sf_print_audio_file_info    xtlang
  • sf_read_file_into_buffer    xtlang
  • sf_samples_from_file    xtlang
  • string_list_from_file    xtlang
  • sys:file-path-components    scheme
  • sys_file_append    xtlang
  • sys_file_close    xtlang
  • sys_file_copy    xtlang
  • sys_file_datasync    xtlang
  • sys_file_datasync    xtlang
  • sys_file_eof    xtlang
  • sys_file_flush    xtlang
  • sys_file_getc    xtlang
  • sys_file_gets    xtlang
  • sys_file_link    xtlang
  • sys_file_mktemp    xtlang
  • sys_file_open    xtlang
  • sys_file_open_stderr    xtlang
  • sys_file_open_stdin    xtlang
  • sys_file_open_stdout    xtlang
  • sys_file_putc    xtlang
  • sys_file_puts    xtlang
  • sys_file_read    xtlang
  • sys_file_remove    xtlang
  • sys_file_rename    xtlang
  • sys_file_seek    xtlang
  • sys_file_sync    xtlang
  • sys_file_ungetc    xtlang
  • sys_file_write    xtlang
  • sys_filepath_root    xtlang
  • sys_g_file_test    xtlang
  • with-input-from-file    scheme
  • with-input-output-from-to-files    scheme
  • with-output-to-file    scheme
  • word_count    xtlang