diff --git a/docs/jams_structure.rst b/docs/jams_structure.rst index 71b44dc7..69acacb8 100644 --- a/docs/jams_structure.rst +++ b/docs/jams_structure.rst @@ -9,7 +9,7 @@ JAMS A JAMS object consists of three basic properties: * ``file_metadata``, which describes the audio file to which these annotations are attached; * ``annotations``, a list of Annotation_ objects (described below); and - * ``sandbox``, an un-restricted place to store any additional data. + * ``sandbox``, an unrestricted place to store any additional data. FileMetadata @@ -32,13 +32,13 @@ Each annotation object contains the following properties: * ``value`` : actual annotation (e.g., chord, segment label) * ``confidence`` : certainty of the annotation * ``annotation_metadata`` : see Annotation_Metadata_; and - * ``sandbox`` : additional un-structured storage space for this annotation. + * ``sandbox`` : additional unstructured storage space for this annotation. The permissible contents of the ``value`` and ``confidence`` fields are defined by the ``namespace``. Annotation_Metadata ~~~~~~~~~~~~~~~~~~~ -The metadata associated with each annotation describes the process by which the annotation was generated. +The meta-data associated with each annotation describes the process by which the annotation was generated. The ``annotation_metadata`` property has the following fields: * ``corpus``: a string describing a corpus to which this annotation belongs; diff --git a/jams/core.py b/jams/core.py index 55deca53..1db1fe57 100644 --- a/jams/core.py +++ b/jams/core.py @@ -230,7 +230,7 @@ def __schema__(self): @property def __json__(self): - r"""Return the JObject as a set of native datatypes for serialization. + r"""Return the JObject as a set of native data types for serialization. Note: attributes beginning with underscores are suppressed. """ @@ -249,7 +249,7 @@ def __json__(self): @classmethod def __json_init__(cls, **kwargs): - """TODO(ejhumphrey@nyu.edu): writeme.""" + """Initialize the object from a dictionary of values""" return cls(**kwargs) def __eq__(self, other): @@ -260,7 +260,7 @@ def __nonzero__(self): return bool(self.__json__) def __getitem__(self, key): - """TODO(ejhumphrey@nyu.edu): writeme.""" + """Dict-style interface""" return self.__dict__[key] def __setattr__(self, name, value): @@ -326,7 +326,7 @@ def keys(self): def update(self, **kwargs): '''Update the attributes of a JObject. - + Parameters ---------- kwargs @@ -351,7 +351,7 @@ def type(self): @classmethod def loads(cls, string): - '''Deserialize a JObject + '''De-serialize a JObject Parameters ---------- @@ -493,7 +493,7 @@ class Sandbox(JObject): class JamsFrame(pd.DataFrame): - '''A dataframe class for JAMS. + '''A data-frame class for JAMS. This automates certain niceties, such as timestamp conversion and serialization. @@ -1038,7 +1038,7 @@ def __init__(self, annotations=None, file_metadata=None, sandbox=None): Parameters ---------- annotations : list of Annotations - Zero or more Annotation objcets + Zero or more Annotation objects file_metadata : FileMetadata (or dict), default=None Metadata corresponding to the audio file. @@ -1266,7 +1266,7 @@ def match_query(string, query): ------- match : bool `True` if `query` is a callable and `query(string) == True` - or if `query` is a regexp and `re.match(query, regexp)` + or if `query` is a regular expression and `re.match(query, string)` `False` otherwise @@ -1288,7 +1288,7 @@ def match_query(string, query): def serialize_obj(obj): '''Custom serialization functionality for working with advanced data types. - - Timedelta objects are convered to floats (in seconds) + - Timedelta objects are converted to floats (in seconds) - numpy arrays are converted to lists - lists are recursively serialized element-wise diff --git a/jams/version.py b/jams/version.py index 1dd51da5..bc032fbf 100644 --- a/jams/version.py +++ b/jams/version.py @@ -3,4 +3,4 @@ """Version info""" short_version = '0.2' -version = '0.2.0rc3' +version = '0.2.0'