<commit_before>#|
 This file is a part of Chirp
 (c) 2013 TymoonNET/NexT http://tymoon.eu (<EMAIL>)
 Author: <NAME> <<EMAIL>>
|#

(in-package #:org.tymoonnext.chirp)

(defvar *geo/id* "https://api.twitter.com/1.1/geo/id/~a.json")
(defvar *geo/reverse-geocode* "https://api.twitter.com/1.1/geo/reverse_geocode.json")
(defvar *geo/search* "https://api.twitter.com/1.1/geo/search.json")
(defvar *geo/similar-places* "https://api.twitter.com/1.1/geo/similar_places.json")

(defclass location ()
  ((%id :initarg :id :accessor id)
   (%name :initarg :name :accessor name)
   (%full-name :initarg :full-name :accessor full-name)
   (%location-type :initarg :location-type :accessor location-type)
   (%latitude :initarg :latitude :accessor latitude)
   (%longitude :initarg :longitude :accessor longitude)
   (%url :initarg :url :accessor url)
   (%country-name :initarg :country-name :accessor country-name)
   (%country-code :initarg :country-code :accessor country-code)
   (%bounding-box :initarg :bounding-box :accessor bounding-box)
   (%poly-lines :initarg :poly-lines :accessor poly-lines)
   (%contained-within :initarg :contained-within :accessor contained-within))
  (:default-initargs
   :id NIL :name NIL :full-name NIL :location-type NIL :latitude NIL :longitude NIL
   :url NIL :country-name NIL :country-code NIL :bounding-box NIL :poly-lines NIL
   :contained-within NIL)
  (:documentation "Twitter object containing Locational data. Used for the Places & Geo API."))

(defmethod print-object ((location location) stream)
  (print-unreadable-object (location stream :type T)
    (format stream "~a #~a" (name location)  (id location)))
  location)

(defclass geometry ()
  ((%shape :initarg :shape :accessor shape)
   (%coordinates :initarg :coordinates :accessor coordinates))
  (:default-initargs :shape (error "Shape type required") :coordinates NIL)
  (:documentation "Object for locations containing geometrical shape data."))

(defmethod print-object ((geometry geometry) stream)
  (print-unreadable-object (geometry stream :type T :identity T)
    (format stream "~a" (shape geometry))))

(defun make-geometry (parameters)<commit_msg>Fixed default-initargs of location class<commit_after>#|
 This file is a part of Chirp
 (c) 2013 TymoonNET/NexT http://tymoon.eu (<EMAIL>)
 Author: <NAME> <<EMAIL>>
|#

(in-package #:org.tymoonnext.chirp)

(defvar *geo/id* "https://api.twitter.com/1.1/geo/id/~a.json")
(defvar *geo/reverse-geocode* "https://api.twitter.com/1.1/geo/reverse_geocode.json")
(defvar *geo/search* "https://api.twitter.com/1.1/geo/search.json")
(defvar *geo/similar-places* "https://api.twitter.com/1.1/geo/similar_places.json")

(defclass location ()
  ((%id :initarg :id :accessor id)
   (%name :initarg :name :accessor name)
   (%full-name :initarg :full-name :accessor full-name)
   (%location-type :initarg :location-type :accessor location-type)
   (%latitude :initarg :latitude :accessor latitude)
   (%longitude :initarg :longitude :accessor longitude)
   (%url :initarg :url :accessor url)
   (%country-name :initarg :country-name :accessor country-name)
   (%country-code :initarg :country-code :accessor country-code)
   (%bounding-box :initarg :bounding-box :accessor bounding-box)
   (%poly-lines :initarg :poly-lines :accessor poly-lines)
   (%contained-within :initarg :contained-within :accessor contained-within))
  (:default-initargs :id NIL :name NIL :full-name NIL :location-type NIL
                     :latitude NIL :longitude NIL :url NIL :country-name NIL
                     :country-code NIL :bounding-box NIL :poly-lines NIL
                     :contained-within NIL)
  (:documentation "Twitter object containing Locational data. Used for the Places & Geo API."))

(defmethod print-object ((location location) stream)
  (print-unreadable-object (location stream :type T)
    (format stream "~a #~a" (name location)  (id location)))
  location)

(defclass geometry ()
  ((%shape :initarg :shape :accessor shape)
   (%coordinates :initarg :coordinates :accessor coordinates))
  (:default-initargs :shape (error "Shape type required") :coordinates NIL)
  (:documentation "Object for locations containing geometrical shape data."))

(defmethod print-object ((geometry geometry) stream)
  (print-unreadable-object (geometry stream :type T :identity T)
    (format stream "~a" (shape geometry))))

(defun make-geometry (parameters)
{'fraction_non_alphanumeric': 0.14572405929304447, 'fraction_numerical': 0.005473204104903079, 'mean_word_length': 4.468827930174563, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '52849', 'n_tokens_mistral': 1503, 'n_tokens_neox': 1422, 'n_words': 395}