Skip to content

Latest commit

 

History

History
52 lines (42 loc) · 1.27 KB

cstnews.org

File metadata and controls

52 lines (42 loc) · 1.27 KB

CSTNews Statistics

(mapcar #'car (file->list "data/cstnews-verb-suggestions.txt"))
(let ((tb (make-hash-table))
      (total (length dados)))
  (mapcar (lambda (n) (incf (gethash n tb 0))) dados)
  (loop for v being the hash-values in tb using (hash-key k)
        collect (list k v (format nil "~5$" (/ v total)))))

Considerando rodada já com dados da TS

(with-open-file (out "cstnews.csv" :direction :output :if-exists :supersede)
  (mapcar (lambda (n) (format out "~a,~a~%" (car n) (length (cadr n))))
          analise))