Changes¶
0.10.0 (2020-03-01)¶
New:¶
Added a logo to textacy’s documentation and social preview :page_with_curl:
Added type hints throughout the code base, for more expressive type indicators in docstrings and for static type checkers used by developers to code more effectively (PR #289)
Added a preprocessing function to normalize sequences of repeating characters (Issue #275)
Changed:¶
Improved core
Corpus
functionality using recent additions to spacy (PR #285)Re-implemented
Corpus.save()
andCorpus.load()
using spacy’s newDocBin
class, which resolved a few bugs/issues (Issue #254)Added
n_process
arg toCorpus.add()
to set the number of parallel processes used when adding many items to a corpus, following spacy’s updates tonlp.pipe()
(Issue #277)Bumped minimum spaCy version from 2.0.12 => 2.2.0, accordingly
Added handling for zero-width whitespaces into
normalize_whitespace()
function (Issue #278)Improved a couple rough spots in package administration:
Moved package setup information into a declarative configuration file, in an attempt to keep up with evolving best practices for Python packaging
Simplified the configuration and interoperability of sphinx + github pages for generating package documentation
Fixed:¶
Fixed typo in ConceptNet docstring (Issue #280)
Trained and distributed a
LangIdentifier
model usingscikit-learn==0.22
, to prevent ambiguous errors when trying to load a file that didn’t exist (Issues #291, #292)
0.9.1 (2019-09-03)¶
Changed:¶
Tweaked
TopicModel
class to work with newer versions ofscikit-learn
, and updated version requirements accordingly from>=0.18.0,<0.21.0
to>=0.19
Fixed:¶
Fixed residual bugs in the script for training language identification pipelines, then trained and released one using
scikit-learn==0.19
to prevent errors for users on that version
0.9.0 (2019-09-03)¶
Note: textacy
is now PY3-only! 🎉 Specifically, support for PY2.7 has been dropped, and the minimum PY3 version has been bumped to 3.6 (PR #261). See below for related changes.
New:¶
Added ``augmentation`` subpackage for basic text data augmentation (PR #268, #269)
implemented several transformer functions for substituting, inserting, swapping, and deleting elements of text at both the word- and character-level
implemented an
Augmenter
class for combining multiple transforms and applying them to spaCyDoc
s in a randomized but configurable mannerNote: This API is provisional, and subject to change in future releases.
Added ``resources`` subpackage for standardized access to linguistic resources (PR #265)
DepecheMood++: high-coverage emotion lexicons for understanding the emotions evoked by a text. Updated from a previous version, and now features better English data and Italian data with expanded, consistent functionality.
removed
lexicon_methods.py
module with previous implementation
ConceptNet: multilingual knowledge base for representing relationships between words, similar to WordNet. Currently supports getting word antonyms, hyponyms, meronyms, and synonyms in dozens of languages.
Added ``UDHR`` dataset, a collection of translations of the Universal Declaration of Human Rights (PR #271)
Changed:¶
Updated and extended functionality previously blocked by PY2 compatibility while reducing code bloat / complexity
made many args keyword-only, to prevent user error
args accepting strings for directory / file paths now also accept
pathlib.Path
objects, withpathlib
adopted widely under the hoodincreased minimum versions and/or uncapped maximum versions of several dependencies, including
jellyfish
,networkx
, andnumpy
Added a Portuguese-specific formulation of Flesch Reading Ease score to
text_stats
(PR #263)Reorganized and grouped together some like functionality
moved core functionality for loading spaCy langs and making spaCy docs into
spacier.core
, out ofcache.py
anddoc.py
moved some general-purpose functionality from
dataset.utils
toio.utils
andutils.py
moved function for loading “hyphenator” out of
cache.py
and intotext_stats.py
, where it’s used
Re-trained and released language identification pipelines using a better mix of training data, for slightly improved performance; also added the script used to train the pipeline
Changed API Reference docs to show items in source code rather than alphabetical order, which should make the ordering more human-friendly
Updated repo README and PyPi metadata to be more consistent and representative of current functionality
Removed previously deprecated
textacy.io.split_record_fields()
function
Fixed:¶
Fixed a regex for cleaning up crufty terms to prevent catastrophic backtracking in certain edge cases (true story: this bug was encountered in production code, and ruined my day)
Fixed bad handling of edge cases in sCAKE keyterm extraction (Issue #270)
Changed order in which URL regexes are applied in
preprocessing.replace_urls()
to properly handle certain edge case URLs (Issue #267)
Contributors:¶
Thanks much to @hugoabonizio for the contribution. 🤝
0.8.0 (2019-07-14)¶
New and Changed:¶
Refactored and expanded text preprocessing functionality (PR #253)
Moved code from a top-level
preprocess
module into apreprocessing
sub-package, and reorganized it in the processAdded new functions:
replace_hashtags()
to replace hashtags like#FollowFriday
or#spacyIRL2019
with_TAG_
replace_user_handles()
to replace user handles like@bjdewilde
or@spacy_io
with_USER_
replace_emojis()
to replace emoji symbols like 😉 or 🚀 with_EMOJI_
normalize_hyphenated_words()
to join hyphenated words back together, likeantici- pation
=>anticipation
normalize_quotation_marks()
to replace “fancy” quotation marks with simple ascii equivalents, like“the god particle”
=>"the god particle"
Changed a couple functions for clarity and consistency:
replace_currency_symbols()
now replaces all dedicated ascii and unicode currency symbols with_CUR_
, rather than just a subset thereof, and no longer provides for replacement with the corresponding currency code (like$
=>USD
)remove_punct()
now has afast (bool)
kwarg rather thanmethod (str)
Removed
normalize_contractions()
,preprocess_text()
, andfix_bad_unicode()
functions, since they were bad/awkward and more trouble than they were worth
Refactored and expanded keyterm extraction functionality (PR #257)
Moved code from a top-level
keyterms
module into ake
sub-package, and cleaned it up / standardized arg names / better shared functionality in the processAdded new unsupervised keyterm extraction algorithms: YAKE (
ke.yake()
), sCAKE (ke.scake()
), and PositionRank (ke.textrank()
, with non-default parameter values)Added new methods for selecting candidate keyterms: longest matching subsequence candidates (
ke.utils.get_longest_subsequence_candidates()
) and pattern-matching candidates (ke.utils.get_pattern_matching_candidates()
)Improved speed of SGRank implementation, and generally optimized much of the code
Improved document similarity functionality (PR #256)
Added a character ngram-based similarity measure (
similarity.character_ngrams()
), for something that’s useful in different contexts than the other measuresRemoved Jaro-Winkler string similarity measure (
similarity.jaro_winkler()
), since it didn’t add much beyond other measuresImproved speed of Token Sort Ratio implementation
Replaced
python-levenshtein
dependency withjellyfish
, for its active development, better documentation, and actually-compliant license
Added customizability to certain functionality
Added options to
Doc._.to_bag_of_words()
andCorpus.word_counts()
for filtering out stop words, punctuation, and/or numbers (PR #249)Allowed for objects that look like
sklearn
-style topic modeling classes to be passed intotm.TopicModel()
(PR #248)Added options to customize rc params used by
matplotlib
when drawing a “termite” plot inviz.draw_termite_plot()
(PR #248)
Removed deprecated functions with direct replacements:
io.utils.get_filenames()
andspacier.components.merge_entities()
Contributors:¶
Huge thanks to @kjoshi and @zf109 for the PRs! 🙌
0.7.1 (2019-06-25)¶
New:¶
Added a default, built-in language identification classifier that’s moderately fast, moderately accurate, and covers a relatively large number of languages [PR #247]
Implemented a Google CLD3-inspired model in
scikit-learn
and trained it on ~1.5M texts in ~130 different languages spanning a wide variety of subject matter and stylistic formality; overall, speed and performance compare favorably to other open-source options (langid
,langdetect
,cld2-cffi
, andcld3
)Dropped
cld2-cffi
dependency [Issue #246]
Added
extract.matches()
function to extract spans from a document matching one or more pattern of per-token (attribute, value) pairs, with optional quantity qualifiers; this is a convenient interface to spaCy’s rule-basedMatcher
and a more powerful replacement for textacy’s existing (now deprecated)extract.pos_regex_matches()
Added
preprocess.normalize_unicode()
function to transform unicode characters into their canonical forms; this is a less-intensive consolation prize for the previously-removedfix_unicode()
function
Changed:¶
Enabled loading blank spaCy
Language
pipelines (tokenization only – no model-based tagging, parsing, etc.) viaload_spacy_lang(name, allow_blank=True)
for use cases that don’t rely on annotations; disabled by default to avoid unwelcome surprisesChanged inclusion/exclusion and de-duplication of entities and ngrams in
to_terms_list()
[Issues #169, #179]entities = True
=> include entities, and drop exact duplicate ngramsentities = False
=> don’t include entities, and also drop exact duplicate ngramsentities = None
=> use ngrams as-is without checking against entities
Moved
to_collection()
function from thedatasets.utils
module to the top-levelutils
module, for use throughout the code baseAdded
quoting
option toio.read_csv()
andio.write_csv()
, for problematic casesDeprecated the
spacier.components.merge_entities()
pipeline component, an implementation of which has since been added into spaCy itselfUpdated documentation for developer convenience and reader clarity
Split API reference docs into related chunks, rather than having them all together in one long page, and tidied up headers
Fixed errors / inconsistencies in various docstrings (a never-ending struggle…)
Ported package readme and changelog from
.rst
to.md
format
Fixed:¶
The
NotImplementedError
previously added topreprocess.fix_unicode()
is now raised rather than returned [Issue #243]
0.7.0 (2019-05-13)¶
New and Changed:¶
Removed textacy.Doc, and split its functionality into two parts
New: Added
textacy.make_spacy_doc()
as a convenient and flexible entry point for making spaCyDoc
s from text or (text, metadata) pairs, with optional spaCy language pipeline specification. It’s similar totextacy.Doc.__init__
, with the exception that text and metadata are passed in together as a 2-tuple.New: Added a variety of custom doc property and method extensions to the global
spacy.tokens.Doc
class, accessible via itsDoc._
“underscore” property. These are similar to the properties/methods ontextacy.Doc
, they just require an interstitial underscore. For example,textacy.Doc.to_bag_of_words()
=>spacy.tokens.Doc._.to_bag_of_words()
.New: Added functions for setting, getting, and removing these extensions. Note that they are set automatically when textacy is imported.
Simplified and improved performance of textacy.Corpus
Documents are now added through a simpler API, either in
Corpus.__init__
orCorpus.add()
; they may be one or a stream of texts, (text, metadata) pairs, or existing spaCyDoc
s. When adding many documents, the spaCy language processing pipeline is used in a faster and more efficient way.Saving / loading corpus data to disk is now more efficient and robust.
Note:
Corpus
is now a collection of spaCyDoc
s rather thantextacy.Doc
s.
Simplified, standardized, and added Dataset functionality
New: Added an
IMDB
dataset, built on the classic 2011 dataset commonly used to train sentiment analysis models.New: Added a base
Wikimedia
dataset, from which a reworkedWikipedia
dataset and a separateWikinews
dataset inherit. The underlying data source has changed, from XML db dumps of raw wiki markup to JSON db dumps of (relatively) clean text and metadata; now, the code is simpler, faster, and totally language-agnostic.Dataset.records()
now streams (text, metadata) pairs rather than a dict containing both text and metadata, so users don’t need to know field names and split them into separate streams before creatingDoc
orCorpus
objects from the data.Filtering and limiting the number of texts/records produced is now clearer and more consistent between
.texts()
and.records()
methods on a givenDataset
— and more performant!Downloading datasets now always shows progress bars and saves to the same file names. When appropriate, downloaded archive files’ contents are automatically extracted for easy inspection.
Common functionality (such as validating filter values) is now standardized and consolidated in the
datasets.utils
module.
Quality of life improvements
Reduced load time for
import textacy
from ~2-3 seconds to ~1 second, by lazy-loading expensive variables, deferring a couple heavy imports, and dropping a couple dependencies. Specifically:ftfy
was dropped, and aNotImplementedError
is now raised in textacy’s wrapper function,textacy.preprocess.fix_bad_unicode()
. Users with bad unicode should now directly callftfy.fix_text()
.ijson
was dropped, and the behavior oftextacy.read_json()
is now simpler and consistent with other functions for line-delimited data.mwparserfromhell
was dropped, since the reworkedWikipedia
dataset no longer requires complicated and slow parsing of wiki markup.
Renamed certain functions and variables for clarity, and for consistency with existing conventions:
textacy.load_spacy()
=>textacy.load_spacy_lang()
textacy.extract.named_entities()
=>textacy.extract.entities()
textacy.data_dir
=>textacy.DEFAULT_DATA_DIR
filename
=>filepath
anddirname
=>dirpath
when specifying full paths to files/dirs on disk, andtextacy.io.utils.get_filenames()
=>textacy.io.utils.get_filepaths()
accordinglycompiled regular expressions now consistently start with
RE_
SpacyDoc
=>Doc
,SpacySpan
=>Span
,SpacyToken
=>Token
,SpacyLang
=>Language
as variables and in docs
Removed deprecated functionality
top-level
spacy_utils.py
andspacy_pipelines.py
are gone; use equivalent functionality in thespacier
subpackage insteadmath_utils.py
is gone; it was long neglected, and never actually used
Replaced
textacy.compat.bytes_to_unicode()
andtextacy.compat.unicode_to_bytes()
withtextacy.compat.to_unicode()
andtextacy.compat.to_bytes()
, which are safer and accept either binary or text strings as input.Moved and renamed language detection functionality,
textacy.text_utils.detect_language()
=>textacy.lang_utils.detect_lang()
. The idea is to add more/better lang-related functionality here in the future.Updated and cleaned up documentation throughout the code base.
Added and refactored many tests, for both new and old functionality, significantly increasing test coverage while significantly reducing run-time. Also, added a proper coverage report to CI builds. This should help prevent future errors and inspire better test-writing.
Bumped the minimum required spaCy version:
v2.0.0
=>v2.0.12
, for access to their full set of custom extension functionality.
Fixed:¶
The progress bar during an HTTP download now always closes, preventing weird nesting issues if another bar is subsequently displayed.
Filtering datasets by multiple values performed either a logical AND or OR over the values, which was confusing; now, a logical OR is always performed.
The existence of files/directories on disk is now checked properly via
os.path.isfile()
oros.path.isdir()
, rather thanos.path.exists()
.Fixed a variety of formatting errors raised by sphinx when generating HTML docs.
0.6.3 (2019-03-23)¶
New:¶
Added a proper contributing guide and code of conduct, as well as separate GitHub issue templates for different user situations. This should help folks contribute to the project more effectively, and make maintaining it a bit easier, too. [Issue #212]
Gave the documentation a new look, using a template popularized by
requests
. Added documentation on dealing with multi-lingual datasets. [Issue #233]Made some minor adjustments to package dependencies, the way they’re specified, and the Travis CI setup, making for a faster and better development experience.
Confirmed and enabled compatibility with v2.1+ of
spacy
. :dizzy:
Changed:¶
Improved the
Wikipedia
dataset class in a variety of ways: it can now read Wikinews db dumps; access records in namespaces other than the usual “0” (such as category pages in namespace “14”); parse and extract category pages in several languages, including in the case of bad wiki markup; and filter out section headings from the accompanying text via aninclude_headings
kwarg. [PR #219, #220, #223, #224, #231]Removed the
transliterate_unicode()
preprocessing function that transliterated non-ascii text into a reasonable ascii approximation, for technical and philosophical reasons. Also removed its GPL-licensedunidecode
dependency, for legal-ish reasons. [Issue #203]Added convention-abiding
exclude
argument to the function that writesspacy
docs to disk, to limit which pipeline annotations are serialized. Replaced the existing but non-standardinclude_tensor
arg.Deprecated the
n_threads
argument inCorpus.add_texts()
, which had not been working inspacy.pipe
for some time and, as of v2.1, is defunct.Made many tests model- and python-version agnostic and thus less likely to break when
spacy
releases new and improved models.Auto-formatted the entire code base using
black
; the results aren’t always more readable, but they are pleasingly consistent.
Fixed:¶
Fixed bad behavior of
key_terms_from_semantic_network()
, where an error would be raised if no suitable key terms could be found; now, an empty list is returned instead. [Issue #211]Fixed variable name typo so
GroupVectorizer.fit()
actually works. [Issue #215]Fixed a minor typo in the quick-start docs. [PR #217]
Check for and filter out any named entities that are entirely whitespace, seemingly caused by an issue in
spacy
.Fixed an undefined variable error when merging spans. [Issue #225]
Fixed a unicode/bytes issue in experimental function for deserializing
spacy
docs in “binary” format. [Issue #228, PR #229]
Contributors:¶
Many thanks to @abevieiramota, @ckot, @Jude188, and @digest0r for their help!
0.6.2 (2018-07-19)¶
Changed:¶
Add a
spacier.util
module, and add / reorganize relevant functionalitymove (most)
spacy_util
functions here, and add a deprecation warning to thespacy_util
modulerename
normalized_str()
=>get_normalized_text()
, for consistency and clarityadd a function to split long texts up into chunks but combine them into a single
Doc
. This is a workaround for a current limitation of spaCy’s neural models, whose RAM usage scales with the length of input text.
Add experimental support for reading and writing spaCy docs in binary format, where multiple docs are contained in a single file. This functionality was supported by spaCy v1, but is not in spaCy v2; I’ve implemented a workaround that should work well in most situations, but YMMV.
Package documentation is now “officially” hosted on GitHub pages. The docs are automatically built on and deployed from Travis via
doctr
, so they stay up-to-date with the master branch on GitHub. Maybe someday I’ll get ReadTheDocs to successfully buildtextacy
once again…Minor improvements/updates to documentation
Fixed:¶
Add missing return statement in deprecated
text_stats.flesch_readability_ease()
function (Issue #191)Catch an empty graph error in bestcoverage-style keyterm ranking (Issue #196)
Fix mishandling when specifying a single named entity type to in/exclude in
extract.named_entities
(Issue #202)Make
networkx
usage in keyterms module compatible with v1.11+ (Issue #199)
0.6.1 (2018-04-11)¶
New:¶
Add a new spacier sub-package for spaCy-oriented functionality (#168, #187)
Thus far, this includes a
components
module with two custom spaCy pipeline components: one to compute text stats on parsed documents, and another to merge named entities into single tokens in an efficient manner. More to come!Similar functionality in the top-level
spacy_pipelines
module has been deprecated; it will be removed in v0.7.0.
Changed:¶
Update the readme, usage, and API reference docs to be clearer and (I hope) more useful. (#186)
Removing punctuation from a text via the
preprocessing
module now replaces punctuation marks with a single space rather than an empty string. This gives better behavior in many situations; for example, “won’t” => “won t” rather than “wont”, the latter of which is a valid word with a different meaning.Categories are now correctly extracted from non-English language Wikipedia datasets, starting with French and German and extendable to others. (#175)
Log progress when adding documents to a corpus. At the debug level, every doc’s addition is logged; at the info level, only one message per batch of documents is logged. (#183)
Fixed:¶
Fix two breaking typos in
extract.direct_quotations()
. (issue #177)Prevent crashes when adding non-parsed documents to a
Corpus
. (#180)Fix bugs in
keyterms.most_discriminating_terms()
that usedvsm
functionality as it was before the changes in v0.6.0. (#189)Fix a breaking typo in
vsm.matrix_utils.apply_idf_weighting()
, and rename the problematic kwarg for consistency with related functions. (#190)
Contributors:¶
Big thanks to @sammous, @dixiekong (nice name!), and @SandyRogers for the pull requests, and many more for pointing out various bugs and the rougher edges / unsupported use cases of this package.
0.6.0 (2018-02-25)¶
Changed:¶
Rename, refactor, and extend I/O functionality (PR #151)
Related read/write functions were moved from
read.py
andwrite.py
into format-specific modules, and similar functions were consolidated into one with the addition of an arg. For example,write.write_json()
andwrite.write_json_lines()
=>json.write_json(lines=True|False)
.Useful functionality was added to a few readers/writers. For example,
write_json()
now automatically handles python dates/datetimes, writing them to disk as ISO-formatted strings rather than raising a TypeError (“datetime is not JSON serializable”, ugh). CSVs can now be written to / read from disk when each row is a dict rather than a list. Reading/writing HTTP streams now allows for basic authentication.Several things were renamed to improve clarity and consistency from a user’s perspective, most notably the subpackage name:
fileio
=>io
. Others:read_file()
andwrite_file()
=>read_text()
andwrite_text()
;split_record_fields()
=>split_records()
, although I kept an alias to the old function for folks;auto_make_dirs
boolean kwarg =>make_dirs
.io.open_sesame()
now handles zip files (provided they contain only 1 file) as it already does for gzip, bz2, and lzma files. On a related note, Python 2 users can now open lzma (.xz
) files if they’ve installedbackports.lzma
.
Improve, refactor, and extend vector space model functionality (PRs #156 and #167)
BM25 term weighting and document-length normalization were implemented, and and users can now flexibly add and customize individual components of an overall weighting scheme (local scaling + global scaling + doc-wise normalization). For API sanity, several additions and changes to the
Vectorizer
init params were required — sorry bout it!Given all the new weighting possibilities, a
Vectorizer.weighting
attribute was added for curious users, to give a mathematical representation of how values in a doc-term matrix are being calculated. Here’s a simple and a not-so-simple case:>>> Vectorizer(apply_idf=True, idf_type='smooth').weighting 'tf * log((n_docs + 1) / (df + 1)) + 1' >>> Vectorizer(tf_type='bm25', apply_idf=True, idf_type='smooth', apply_dl=True).weighting '(tf * (k + 1)) / (tf + k * (1 - b + b * (length / avg(lengths))) * log((n_docs - df + 0.5) / (df + 0.5))'
Terms are now sorted alphabetically after fitting, so you’ll have a consistent and interpretable ordering in your vocabulary and doc-term-matrix.
A
GroupVectorizer
class was added, as a child ofVectorizer
and an extension of typical document-term matrix vectorization, in which each row vector corresponds to the weighted terms co-occurring in a single document. This allows for customized grouping, such as by a shared author or publication year, that may span multiple documents, without forcing users to merge /concatenate those documents themselves.Lastly, the
vsm.py
module was refactored into avsm
subpackage with two modules. Imports should stay the same, but the code structure is now more amenable to future additions.
Miscellaneous additions and improvements
Flesch Reading Ease in the
textstats
module is now multi-lingual! Language- specific formulations for German, Spanish, French, Italian, Dutch, and Russian were added, in addition to (the default) English. (PR #158, prompted by Issue #155)Runtime performance, as well as docs and error messages, of functions for generating semantic networks from lists of terms or sentences were improved. (PR #163)
Labels on named entities from which determiners have been dropped are now preserved. There’s still a minor gotcha, but it’s explained in the docs.
The size of
textacy
’s data cache can now be set via an environment variable,TEXTACY_MAX_CACHE_SIZE
, in case the default 2GB cache doesn’t meet your needs.Docstrings were improved in many ways, large and small, throughout the code. May they guide you even more effectively than before!
The package version is now set from a single source. This isn’t for you so much as me, but it does prevent confusing version mismatches b/w code, pypi, and docs.
All tests have been converted from
unittest
topytest
style. They run faster, they’re more informative in failure, and they’re easier to extend.
Fixed:¶
Fixed an issue where existing metadata associated with a spacy Doc was being overwritten with an empty dict when using it to initialize a textacy Doc. Users can still overwrite existing metadata, but only if they pass in new data.
Added a missing import to the README’s usage example. (#149)
The intersphinx mapping to
numpy
got fixed (and items forscipy
andmatplotlib
were added, too). Taking advantage of that, a bunch of broken object links scattered throughout the docs got fixed.Fixed broken formatting of old entries in the changelog, for your reading pleasure.
0.5.0 (2017-12-04)¶
Changed:¶
Bumped version requirement for spaCy from < 2.0 to >= 2.0 — textacy no longer works with spaCy 1.x! It’s worth the upgrade, though. v2.0’s new features and API enabled (or required) a few changes on textacy’s end
textacy.load_spacy()
takes the same inputs as the newspacy.load()
, i.e. a packagename
string and an optional list of pipes todisable
textacy’s
Doc
metadata and language string are now stored inuser_data
directly on the spaCyDoc
object; although the API from a user’s perspective is unchanged, this made the next change possibleDoc
andCorpus
classes are now de/serialized via pickle into a single file — no more side-car JSON files for metadata! Accordingly, the.save()
and.load()
methods on both classes have a simpler API: they take a single string specifying the file on disk where data is stored.
Cleaned up docs, imports, and tests throughout the entire code base.
docstrings and https://textacy.readthedocs.io ‘s API reference are easier to read, with better cross-referencing and far fewer broken web links
namespaces are less cluttered, and textacy’s source code is easier to follow
import textacy
takes less than half the time from beforethe full test suite also runs about twice as fast, and most tests are now more robust to changes in the performance of spaCy’s models
consistent adherence to conventions eases users’ cognitive load :)
The module responsible for caching loaded data in memory was cleaned up and improved, as well as renamed: from
data.py
tocache.py
, which is more descriptive of its purpose. Otherwise, you shouldn’t notice much of a difference besides things working correctly.All loaded data (e.g. spacy language pipelines) is now cached together in a single LRU cache whose max size is set to 2GB, and the size of each element in the cache is now accurately computed. (tl;dr:
sys.getsizeof
does not work on non-built-in objects like, say, aspacy.tokens.Doc
.)Loading and downloading of the DepecheMood resource is now less hacky and weird, and much closer to how users already deal with textacy’s various
Dataset
s, In fact, it can be downloaded in exactly the same way as the datasets via textacy’s new CLI:$ python -m textacy download depechemood
. P.S. A brief guide for using the CLI got added to the README.
Several function/method arguments marked for deprecation have been removed. If you’ve been ignoring the warnings that print out when you use
lemmatize=True
instead ofnormalize='lemma'
(etc.), now is the time to update your calls!Of particular note: The
readability_stats()
function has been removed; useTextStats(doc).readability_stats
instead.
Fixed:¶
In certain situations, the text of a spaCy span was being returned without whitespace between tokens; that has been avoided in textacy, and the source bug in spaCy got fixed (by yours truly! https://github.com/explosion/spaCy/pull/1621).
When adding already-parsed
Doc
s to aCorpus
, includingmetadata
now correctly overwrites any existing metadata on those docs.Fixed a couple related issues involving the assignment of a 2-letter language string to the
.lang
attribute ofDoc
andCorpus
objects.textacy’s CLI wasn’t correctly handling certain dataset kwargs in all cases; now, all kwargs get to their intended destinations.
0.4.2 (2017-11-28)¶
New:¶
Added a CLI for downloading
textacy
-related data, inspired by thespaCy
equivalent. It’s temporarily undocumented, but to see available commands and options, just pass the usual flag:$ python -m textacy --help
. Expect more functionality (and docs!) to be added soonish. (#144)Note: The existing
Dataset.download()
methods work as before, and in fact, they are being called under the hood from the command line.
Changed:¶
Made usage of
networkx
v2.0-compatible, and therefore dropped the <2.0 version requirement on that dependency. Upgrade as you please! (#131)Improved the regex for identifying phone numbers so that it’s easier to view and interpret its matches. (#128)
Fixed:¶
Fixed caching of counts on
textacy.Doc
instance-specific, rather than shared by all instances of the class. Oops.Fixed currency symbols regex, so as not to replace all instances of the letter “z” when a custom string is passed into
replace_currency_symbols()
. (#137)Fixed README usage example, which skipped downloading of dataset data. Btw, see above for another way! (#124)
Fixed typo in the API reference, which included the SupremeCourt dataset twice and omitted the RedditComments dataset. (#129)
Fixed typo in
RedditComments.download()
that prevented it from downloading any data. (#143)
Contributors:¶
Many thanks to @asifm, @harryhoch, and @mdlynch37 for submitting PRs!
0.4.1 (2017-07-27)¶
Changed:¶
Added key classes to the top-level
textacy
imports, for convenience:textacy.text_stats.TextStats
=>textacy.TextStats
textacy.vsm.Vectorizer
=>textacy.Vectorizer
textacy.tm.TopicModel
=>textacy.TopicModel
Added tests for
textacy.Doc
and updated the README’s usage example
Fixed:¶
Added explicit encoding when opening Wikipedia database files in text mode to resolve an issue when doing so without encoding on Windows (PR #118)
Fixed
keyterms.most_discriminating_terms
to use thevsm.Vectorizer
class rather than thevsm.doc_term_matrix
function that it replaced (PR #120)Fixed mishandling of a couple optional args in
Doc.to_terms_list
Contributors:¶
Thanks to @minketeer and @Gregory-Howard for the fixes!
0.4.0 (2017-06-21)¶
New and Changed:¶
Refactored and expanded built-in
corpora
, now calleddatasets
(PR #112)The various classes in the old
corpora
subpackage had a similar but frustratingly not-identical API. Also, some fetched the corresponding dataset automatically, while others required users to do it themselves. Ugh.These classes have been ported over to a new
datasets
subpackage; they now have a consistent API, consistent features, and consistent documentation. They also have some new functionality, including pain-free downloading of the data and saving it to disk in a stream (so as not to use all your RAM).Also, there’s a new dataset: A collection of 2.7k Creative Commons texts from the Oxford Text Archive, which rounds out the included datasets with English-language, 16th-20th century literary works. (h/t @JonathanReeve)
A
Vectorizer
class to convert tokenized texts into variously weighted document-term matrices (Issue #69, PR #113)This class uses the familiar
scikit-learn
API (which is also consistent with thetextacy.tm.TopicModel
class) to convert one or more documents in the form of “term lists” into weighted vectors. An initial set of documents is used to build up the matrix vocabulary (via.fit()
), which can then be applied to new documents (via.transform()
).It’s similar in concept and usage to sklearn’s
CountVectorizer
orTfidfVectorizer
, but doesn’t convolve the tokenization task as they do. This means users have more flexibility in deciding which terms to vectorize. This class outright replaces thetextacy.vsm.doc_term_matrix()
function.
Customizable automatic language detection for
Doc
sAlthough
cld2-cffi
is fast and accurate, its installation is problematic for some users. Since other language detection libraries are available (e.g. ``langdetect` <https://github.com/Mimino666/langdetect>`_ and ``langid` <https://github.com/saffsd/langid.py>`_), it makes sense to let users choose, as needed or desired.First,
cld2-cffi
is now an optional dependency, i.e. is not installed by default. To install it, dopip install textacy[lang]
or (for it and all other optional deps) dopip install textacy[all]
. (PR #86)Second, the
lang
param used to instantiateDoc
objects may now be a callable that accepts a unicode string and returns a standard 2-letter language code. This could be a function that useslangdetect
under the hood, or a function that always returns “de” – it’s up to users. Note that the default value is nowtextacy.text_utils.detect_language()
, which usescld2-cffi
, so the default behavior is unchanged.
Customizable punctuation removal in the
preprocessing
module (Issue #91)Users can now specify which punctuation marks they wish to remove, rather than always removing all marks.
In the case that all marks are removed, however, performance is now 5-10x faster by using Python’s built-in
str.translate()
method instead of a regular expression.
textacy
, installable viaconda
(PR #100)The package has been added to Conda-Forge (here), and installation instructions have been added to the docs. Hurray!
textacy
, now with helpful badgesBuilds are now automatically tested via Travis CI, and there’s a badge in the docs showing whether the build passed or not. The days of my ignoring broken tests in
master
are (probably) over…There are also badges showing the latest releases on GitHub, pypi, and conda-forge (see above).
Fixed:¶
Fixed the check for overlap between named entities and unigrams in the
Doc.to_terms_list()
method (PR #111)Corpus.add_texts()
uses CPU_COUNT - 1 threads by default, rather than always assuming that 4 cores are available (Issue #89)Added a missing coding declaration to a test file, without which tests failed for Python 2 (PR #99)
readability_stats()
now catches an exception raised on empty documents and logs a message, rather than barfing with an unhelpfulZeroDivisionError
. (Issue #88)Added a check for empty terms list in
terms_to_semantic_network
(Issue #105)Added and standardized module-specific loggers throughout the code base; not a bug per sé, but certainly some much-needed housecleaning
Added a note to the docs about expectations for bytes vs. unicode text (PR #103)
Contributors:¶
Thanks to @henridwyer, @rolando, @pavlin99th, and @kyocum for their contributions! :raised_hands:
0.3.4 (2017-04-17)¶
New and Changed:¶
Improved and expanded calculation of basic counts and readability statistics in
text_stats
module.Added a
TextStats()
class for more convenient, granular access to individual values. See usage docs for more info. When calculating, say, just one readability statistic, performance with this class should be slightly better; if calculating all statistics, performance is worse owing to unavoidable, added overhead in Python for variable lookups. The legacy functiontext_stats.readability_stats()
still exists and behaves as before, but a deprecation warning is displayed.Added functions for calculating Wiener Sachtextformel (PR #77), LIX, and GULPease readability statistics.
Added number of long words and number of monosyllabic words to basic counts.
Clarified the need for having spacy models installed for most use cases of textacy, in addition to just the spacy package.
README updated with comments on this, including links to more extensive spacy documentation. (Issues #66 and #68)
Added a function,
compat.get_config()
that includes information about which (if any) spacy models are installed.Recent changes to spacy, including a warning message, will also make model problems more apparent.
Added an
ngrams
parameter tokeyterms.sgrank()
, allowing for more flexibility in specifying valid keyterm candidates for the algorithm. (PR #75)Dropped dependency on
fuzzywuzzy
package, replacing usage offuzz.token_sort_ratio()
with a textacy equivalent in order to avoid license incompatibilities. As a bonus, the new code seems to perform faster! (Issue #62)Note: Outputs are now floats in [0.0, 1.0], consistent with other similarity functions, whereas before outputs were ints in [0, 100]. This has implications for
match_threshold
values passed tosimilarity.jaccard()
; a warning is displayed and the conversion is performed automatically, for now.
A MANIFEST.in file was added to include docs, tests, and distribution files in the source distribution. This is just good practice. (PR #65)
Fixed:¶
Known acronym-definition pairs are now properly handled in
extract.acronyms_and_definitions()
(Issue #61)WikiReader no longer crashes on null page element content while parsing (PR #64)
Fixed a rare but perfectly legal edge case exception in
keyterms.sgrank()
, and added a window width sanity check. (Issue #72)Fixed assignment of 2-letter language codes to
Doc
andCorpus
objects when the lang parameter is specified as a full spacy model name.Replaced several leftover print statements with proper logging functions.
Contributors:¶
Big thanks to @oroszgy, @rolando, @covuworie, and @RolandColored for the pull requests!
0.3.3 (2017-02-10)¶
New and Changed:¶
Added a consistent
normalize
param to functions and methods that require token/span text normalization. Typically, it takes one of the following values: ‘lemma’ to lemmatize tokens, ‘lower’ to lowercase tokens, False-y to not normalize tokens, or a function that converts a spacy token or span into a string, in whatever way the user prefers (e.g.spacy_utils.normalized_str()
).Functions modified to use this param:
Doc.to_bag_of_terms()
,Doc.to_bag_of_words()
,Doc.to_terms_list()
,Doc.to_semantic_network()
,Corpus.word_freqs()
,Corpus.word_doc_freqs()
,keyterms.sgrank()
,keyterms.textrank()
,keyterms.singlerank()
,keyterms.key_terms_from_semantic_network()
,network.terms_to_semantic_network()
,network.sents_to_semantic_network()
Tweaked
keyterms.sgrank()
for higher quality results and improved internal performance.When getting both n-grams and named entities with
Doc.to_terms_list()
, filtering out numeric spans for only one is automatically extended to the other. This prevents unexpected behavior, such as passingfilter_nums=True
but getting numeric named entities back in the terms list.
Fixed:¶
keyterms.sgrank()
no longer crashes if a term is missing fromidfs
mapping. (@jeremybmerrill, issue #53)Proper nouns are no longer excluded from consideration as keyterms in
keyterms.sgrank()
andkeyterms.textrank()
. (@jeremybmerrill, issue #53)Empty strings are now excluded from consideration as keyterms — a bug inherited from spaCy. (@mlehl88, issue #58)
0.3.2 (2016-11-15)¶
New and Changed:¶
Preliminary inclusion of custom spaCy pipelines
updated
load_spacy()
to include explicit path and create_pipeline kwargs, and removed the already-deprecatedload_spacy_pipeline()
function to avoid confusion around spaCy languages and pipelinesadded
spacy_pipelines
module to hold implementations of custom spaCy pipelines, including a basic one that merges entities into single tokensnote: necessarily bumped minimum spaCy version to 1.1.0+
see the announcement here: https://explosion.ai/blog/spacy-deep-learning-keras
To reduce code bloat, made the
matplotlib
dependency optional and dropped thegensim
dependencyto install
matplotlib
at the same time as textacy, do$ pip install textacy[viz]
bonus:
backports.csv
is now only installed for Py2 usersthanks to @mbatchkarov for the request
Improved performance of
textacy.corpora.WikiReader().texts()
; results should stream faster and have cleaner plaintext content than when they were produced bygensim
. This should also fix a bug reported in Issue #51 by @baiskAdded a
Corpus.vectors
property that returns a matrix of shape (# documents, vector dim) containing the average word2vec-style vector representation of constituent tokens for allDoc
s
0.3.1 (2016-10-19)¶
Changed:¶
Updated spaCy dependency to the latest v1.0.1; set a floor on other dependencies’ versions to make sure everyone’s running reasonably up-to-date code
Fixed:¶
Fixed incorrect kwarg in
sgrank
‘s call toextract.ngrams()
(@patcollis34, issue #44)Fixed import for
cachetool
‘shashkey
, which changed in the v2.0 (@gramonov, issue #45)
0.3.0 (2016-08-23)¶
New and Changed:¶
Refactored and streamlined
TextDoc
; changed name toDoc
simplified init params:
lang
can now be a language code string or an equivalentspacy.Language
object, andcontent
is either a string orspacy.Doc
; param values and their interactions are better checked for errors and inconsistenciesrenamed and improved methods transforming the Doc; for example,
.as_bag_of_terms()
is now.to_bag_of_terms()
, and terms can be returned as integer ids (default) or as strings with absolute, relative, or binary frequencies as weightsadded performant
.to_bag_of_words()
method, at the cost of less customizability of what gets included in the bag (no stopwords or punctuation); words can be returned as integer ids (default) or as strings with absolute, relative, or binary frequencies as weightsremoved methods wrapping
extract
functions, in favor of simply calling that function on the Doc (see below for updates toextract
functions to make this more convenient); for example,TextDoc.words()
is nowextract.words(Doc)
removed
.term_counts()
method, which was redundant withDoc.to_bag_of_terms()
renamed
.term_count()
=>.count()
, and checking + caching results is now smarter and faster
Refactored and streamlined
TextCorpus
; changed name toCorpus
added init params: can now initialize a
Corpus
with a stream of texts, spacy or textacy Docs, and optional metadatas, analogous toDoc
; accordingly, removed.from_texts()
class methodrefactored, streamlined, bug-fixed, and made consistent the process of adding, getting, and removing documents from
Corpus
getting/removing by index is now equivalent to the built-in
list
API:Corpus[:5]
gets the first 5Doc
s, anddel Corpus[:5]
removes the first 5, automatically keeping track of corpus statistics for total # docs, sents, and tokensgetting/removing by boolean function is now done via the
.get()
and.remove()
methods, the latter of which now also correctly tracks corpus statsadding documents is split across the
.add_text()
,.add_texts()
, and.add_doc()
methods for performance and clarity reasons
added
.word_freqs()
and.word_doc_freqs()
methods for getting a mapping of word (int id or string) to global weight (absolute, relative, binary, or inverse frequency); akin to a vectorized representation (see:textacy.vsm
) but in non-vectorized form, which can be usefulremoved
.as_doc_term_matrix()
method, which was just wrapping another function; so, instead ofcorpus.as_doc_term_matrix((doc.as_terms_list() for doc in corpus))
, dotextacy.vsm.doc_term_matrix((doc.to_terms_list(as_strings=True) for doc in corpus))
Updated several
extract
functionsalmost all now accept either a
textacy.Doc
orspacy.Doc
as inputrenamed and improved parameters for filtering for or against certain POS or NE types; for example,
good_pos_tags
is nowinclude_pos
, and will accept either a single POS tag as a string or a set of POS tags to filter for; same goes forexclude_pos
, and analogouslyinclude_types
, andexclude_types
Updated corpora classes for consistency and added flexibility
enforced a consistent API:
.texts()
for a stream of plain text documents and.records()
for a stream of dicts containing both text and metadataadded filtering options for
RedditReader
, e.g. by date or subreddit, consistent with other corpora (similar tweaks toWikiReader
may come later, but it’s slightly more complicated…)added a nicer
repr
forRedditReader
andWikiReader
corpora, consistent with other corpora
Moved
vsm.py
andnetwork.py
into the top-level oftextacy
and thus removed therepresentations
subpackagerenamed
vsm.build_doc_term_matrix()
=>vsm.doc_term_matrix()
, because the “build” part of it is obvious
Renamed
distance.py
=>similarity.py
; all returned values are now similarity metrics in the interval [0, 1], where higher values indicate higher similarityRenamed
regexes_etc.py
=>constants.py
, without additional changesRenamed
fileio.utils.split_content_and_metadata()
=>fileio.utils.split_record_fields()
, without further changes (except for tweaks to the docstring)Added functions to read and write delimited file formats:
fileio.read_csv()
andfileio.write_csv()
, where the delimiter can be any valid one-char string; gzip/bzip/lzma compression is handled automatically when availableAdded better and more consistent docstrings and usage examples throughout the code base
0.2.8 (2016-08-03)¶
New:¶
Added two new corpora!
the CapitolWords corpus: a collection of 11k speeches (~7M tokens) given by the main protagonists of the 2016 U.S. Presidential election that had previously served in the U.S. Congress — including Hillary Clinton, Bernie Sanders, Barack Obama, Ted Cruz, and John Kasich — from January 1996 through June 2016
the SupremeCourt corpus: a collection of 8.4k court cases (~71M tokens) decided by the U.S. Supreme Court from 1946 through 2016, with metadata on subject matter categories, ideology, and voting patterns
DEPRECATED: the Bernie and Hillary corpus, which is a small subset of CapitolWords that can be easily recreated by filtering CapitolWords by
speaker_name={'Bernie Sanders', 'Hillary Clinton'}
Changed:¶
Refactored and improved
fileio
subpackagemoved shared (read/write) functions into separate
fileio.utils
modulealmost all read/write functions now use
fileio.utils.open_sesame()
, enabling seamless fileio for uncompressed or gzip, bz2, and lzma compressed files; relative/user-home-based paths; and missing intermediate directories. NOTE: certain file mode / compression pairs simply don’t work (this is Python’s fault), so users may run into exceptions; in Python 3, you’ll almost always want to use text mode (‘wt’ or ‘rt’), but in Python 2, users can’t read or write compressed files in text mode, only binary mode (‘wb’ or ‘rb’)added options for writing json files (matching stdlib’s
json.dump()
) that can help save spacefileio.utils.get_filenames()
now matches for/against a regex pattern rather than just a contained substring; using the old params will now raise a deprecation warningBREAKING:
fileio.utils.split_content_and_metadata()
now hasitemwise=False
by default, rather thanitemwise=True
, which means that splitting multi-document streams of content and metadata into parallel iterators is now the default actionadded
compression
param toTextCorpus.save()
and.load()
to optionally write metadata json file in compressed formmoved
fileio.write_conll()
functionality toexport.doc_to_conll()
, which converts a spaCy doc into a ConLL-U formatted string; writing that string to disk would require a separate call tofileio.write_file()
Cleaned up deprecated/bad Py2/3
compat
imports, and added better functionality for Py2/3 stringsnow
compat.unicode_type
used for text data,compat.bytes_type
for binary data, andcompat.string_types
for when either will doalso added
compat.unicode_to_bytes()
andcompat.bytes_to_unicode()
functions, for converting between string types
Fixed:¶
Fixed document(s) removal from
TextCorpus
objects, including correct decrementing of.n_docs
,.n_sents
, and.n_tokens
attributes (@michelleful #29)Fixed OSError being incorrectly raised in
fileio.open_sesame()
on missing fileslang
parameter inTextDoc
andTextCorpus
can now be unicode or bytes, which was bug-like
0.2.5 (2016-07-14)¶
Fixed:¶
Added (missing)
pyemd
andpython-levenshtein
dependencies to requirements and setup filesFixed bug in
data.load_depechemood()
arising from the Py2csv
module’s inability to take unicode as input (thanks to @robclewley, issue #25)
0.2.4 (2016-07-14)¶
New and Changed:¶
New features for
TextDoc
andTextCorpus
classesadded
.save()
methods and.load()
classmethods, which allows for fast serialization of parsed documents/corpora and associated metadata to/from disk — with an important caveat: ifspacy.Vocab
object used to serialize and deserialize is not the same, there will be problems, making this format useful as short-term but not long-term storageTextCorpus
may now be instantiated with an already-loaded spaCy pipeline, which may or may not have all models loaded; it can still be instantiated using a language code string (‘en’, ‘de’) to load a spaCy pipeline that includes all models by defaultTextDoc
methods wrappingextract
andkeyterms
functions now have full documentation rather than forwarding users to the wrapped functions themselves; more irritating on the dev side, but much less irritating on the user side :)
Added a
distance.py
module containing several document, set, and string distance metricsword movers: document distance as distance between individual words represented by word2vec vectors, normalized
“word2vec”: token, span, or document distance as cosine distance between (average) word2vec representations, normalized
jaccard: string or set(string) distance as intersection / overlap, normalized, with optional fuzzy-matching across set members
hamming: distance between two strings as number of substititions, optionally normalized
levenshtein: distance between two strings as number of substitions, deletions, and insertions, optionally normalized (and removed a redundant function from the still-orphaned
math_utils.py
module)jaro-winkler: distance between two strings with variable prefix weighting, normalized
Added
most_discriminating_terms()
function tokeyterms
module to take a collection of documents split into two exclusive groups and compute the most discriminating terms for group1-and-not-group2 as well as group2-and-not-group1
Fixed:¶
fixed variable name error in docs usage example (thanks to @licyeus, PR #23)
0.2.3 (2016-06-20)¶
New and Changed:¶
Added
corpora.RedditReader()
class for streaming Reddit comments from disk, with.texts()
method for a stream of plaintext comments and.comments()
method for a stream of structured comments as dicts, with basic filtering by text length and limiting the number of comments returnedRefactored functions for streaming Wikipedia articles from disk into a
corpora.WikiReader()
class, with.texts()
method for a stream of plaintext articles and.pages()
method for a stream of structured pages as dicts, with basic filtering by text length and limiting the number of pages returnedUpdated README and docs with a more comprehensive — and correct — usage example; also added tests to ensure it doesn’t get stale
Updated requirements to latest version of spaCy, as well as added matplotlib for
viz
Fixed:¶
textacy.preprocess.preprocess_text()
is now, once again, imported at the top level, so easily reachable viatextacy.preprocess_text()
(@bretdabaker #14)viz
subpackage now included in the docs’ API referencemissing dependencies added into
setup.py
so pip install handles everything for folks
0.2.2 (2016-05-05)¶
New and Changed:¶
Added a
viz
subpackage, with two types of plots (so far):viz.draw_termite_plot()
, typically used to evaluate and interpret topic models; conveniently accessible from thetm.TopicModel
classviz.draw_semantic_network()
for visualizing networks such as those output byrepresentations.network
Added a “Bernie & Hillary” corpus with 3000 congressional speeches made by Bernie Sanders and Hillary Clinton since 1996
corpora.fetch_bernie_and_hillary()
function automatically downloads to and loads from disk this corpus
Modified
data.load_depechemood
function, now downloads data from GitHub source if not found on diskRemoved
resources/
directory from GitHub, hence all the downloadin’Updated to spaCy v0.100.7
German is now supported! although some functionality is English-only
added
textacy.load_spacy()
function for loading spaCy packages, taking advantage of the newspacy.load()
API; added a DeprecationWarning fortextacy.data.load_spacy_pipeline()
proper nouns’ and pronouns’
.pos_
attributes are now correctly assigned ‘PROPN’ and ‘PRON’; hence, modifiedregexes_etc.POS_REGEX_PATTERNS['en']
to include ‘PROPN’modified
spacy_utils.preserve_case()
to check for language-agnostic ‘PROPN’ POS rather than English-specific ‘NNP’ and ‘NNPS’ tags
Added
text_utils.clean_terms()
function for cleaning up a sequence of single- or multi-word strings by stripping leading/trailing junk chars, handling dangling parens and odd hyphenation, etc.
Fixed:¶
textstats.readability_stats()
now correctly gets the number of words in a doc from its generator function (@gryBox #8)removed NLTK dependency, which wasn’t actually required
text_utils.detect_language()
now warns vialogging
rather than aprint()
statementfileio.write_conll()
documentation now correctly indicates that the filename param is not optional
0.2.0 (2016-04-11)¶
New and Changed:¶
Added
representations
subpackage; includes modules for network and vector space model (VSM) document and corpus representationsDocument-term matrix creation now takes documents represented as a list of terms (rather than as spaCy Docs); splits the tokenization step from vectorization for added flexibility
Some of this functionality was refactored from existing parts of the package
Added
tm
(topic modeling) subpackage, with a mainTopicModel
class for training, applying, persisting, and interpreting NMF, LDA, and LSA topic models through a single interfaceVarious improvements to
TextDoc
andTextCorpus
classesTextDoc
can now be initialized from a spaCy DocRemoved caching from
TextDoc
, because it was a pain and weird and probably not all that usefulextract
-based methods are now generators, like the functions they wrapAdded
.as_semantic_network()
and.as_terms_list()
methods toTextDoc
TextCorpus.from_texts()
now takes advantage of multithreading via spaCy, if available, and document metadata can be passed in as a paired iterable of dicts
Added read/write functions for sparse scipy matrices
Added
fileio.read.split_content_and_metadata()
convenience function for splitting (text) content from associated metadata when reading data from disk into aTextDoc
orTextCorpus
Renamed
fileio.read.get_filenames_in_dir()
tofileio.read.get_filenames()
and added functionality for matching/ignoring files by their names, file extensions, and ignoring invisible filesRewrote
export.docs_to_gensim()
, now significantly fasterImports in
__init__.py
files for main and subpackages now explicit
Fixed:¶
textstats.readability_stats()
no longer filters out stop words (@henningko #7)Wikipedia article processing now recursively removes nested markup
extract.ngrams()
now filters out ngrams with any space-only tokensfunctions with
include_nps
kwarg changed toinclude_ncs
, to match the renaming of the associated function fromextract.noun_phrases()
toextract.noun_chunks()
0.1.4 (2016-02-26)¶
New:¶
Added
corpora
subpackage withwikipedia.py
module; functions for streaming pages from a Wikipedia db dump as plain text or structured dataAdded
fileio
subpackage with functions for reading/writing content from/to disk in common formatsJSON formats, both standard and streaming-friendly
text, optionally compressed
spacy documents to/from binary
0.1.3 (2016-02-22)¶
New:¶
Added
export.py
module for exporting textacy/spacy objects into “third-party” formats; so far, just gensim and conll-uAdded
compat.py
module for Py2/3 compatibility hacksAdded
TextDoc.merge()
andspacy_utils.merge_spans()
for merging spans into single tokens within aspacy.Doc
, uses Spacy’s recent implementation
Changed:¶
Renamed
extract.noun_phrases()
toextract.noun_chunks()
to match Spacy’s APIChanged extract functions to generators, rather than returning lists
Fixed:¶
Whitespace tokens now always filtered out of
extract.words()
listsSome Py2/3 str/unicode issues fixed
Broken tests in
test_extract.py
no longer broken


Bees are Helpful
Bees are some of the most industrious creatures around. They pollinate flowers, make honey, and give great high fives.
Bees are Exciting
You never know what's going to happen when a bee is around. It could sting you, it could buzz around happily, or it could advertise a cereal to you.
Bees are Dying
However, due to parasites, pesticides, and a lack of gentic diversity bees have been dying at an upsetting rate. Which saddens me.


Where to?
Where to? 1.0.0 - Random EFT map selector
Use button to display a random map name from Escape From Tarkov game (No Labs)
Woods
Shoreline
Customs
Interchange
Factory
Reserve
Shut up an go to:
Choose me!
Where to go?


THE REMAINS OF THE DAY A film review by Jean Krevor Copyright 1993 Jean Krevor
Greetings all!
Once again, your non-critical previewer has seen something so worthwhile that she felt compelled to tell y'all about it. This time the film is THE REMAINS OF THE DAY. I'm not sure when it opens, but when it does, *see it*!!!
It stars Anthony Hopkins as Stevens, the "perfect English Butler"; Emma Thompson as Miss Kenton, the housekeeper; Christopher Reeve as Senator Lewis, the new owner of the estate where Stevens "buttles"; Peter Vaughan as Stevens Sr.; and James Fox as Lord Darlington, the original (during Stevens' time there) Lord of the Estate.
The film opens in 1958, and Stevens is embarking in a journey across England. He is the "perfect English Butler," now employed by Mr. Lewis, the new American owner of Darlington Hall, where Stevens has spent the best part of his working life. In the course of his trip, through many breathtaking flashback sequences, Stevens reviews his life in service to Lord Darlington, the former owner of Darlington Hall, and what it was like to be in the middle of political intrigue, relationships, and day to day life in the 1930s, while being completely in blinders.
That's all I can really say about the plot without spoiling the film for you. I assure you that it is quite worthwhile, and should be in the running for Best Picture this year. It was written by Kazuo Ishiguro (! surprised me too!), and the novel THE REMAINS OF THE DAY won the 1989 Booker Prize.
Most of the other crew on this film are also known for their work on such films as A ROOM WITH A VIEW, MR. AND MRS. BRIDGE, and HOWARDS END.
The costumes are lovely. Being circa 1930s, they are not too far off from what we'd see today in formal wear, and are absolutely exquisite.
Oh, the director is James Ivory, known for the above mentioned films, as well as THE BOSTONIANS (also with Christopher Reeve), MAURICE, and SLAVES OF NEW YORK. He is currently working on a film about Thomas Jefferson's Paris years as American Ambassador, starring Nick Nolte and Greta Scacchi. Filming begins in March 1994.
In writing about this film I would be remiss if I didn't mention the absolutely spectacular location work. While the film was about one location, many different British estates were used in the filming.
The exteriors were shot at Dyrham Park; built around the turn of the 18th century for a minister of William III, the mansion stands in a valley, with fields and gardens and winding roads as far as the eye can see.
Many of the interior shots were filmed at Powderham Castle, near Exeter. This castle has been the seat of the Courtenays, Earls of Devon, for over 600 years. Here, they used the staircase hall (I wish my *apartment* was as large and luxurious as this "hall"!), the Music room, the Library (pant, pant, pant, ...) the "Ante room," and the State bedroom, a place where I'm sure I could spend many a dreamy night....
Other locations included Corsham Court in Wiltshire, today the home of Lord Methuen. Here they filmed the picture gallery, another lust-worthy library, and the dining room--oh wow ... but I digress!
The scenes in the servants' quarters were shot at Badminton House in Gloucestershire, the seat of the Dukes of Beaufort. As much of the film takes place "below stairs," this location was quite important. It was difficult to find, as the lifestyle required in these manor houses has become quite impossible to maintain for all but the most affluent nobility. Many of the "Backstairs" sections of English country houses have been converted to restaurants, museum shops, flats for the custodians. Badminton is still a "living" house, however, the present Duke and his family do live far more simply than their predecessors. The servants' quarters remain as they were, although are largely unoccupied. It is interesting to note that it was much more difficult to find these locations--kitchen, servants hall, Butler's pantry, scullery, etc.---than to find the magnificent state rooms.
Anthony Hopkins delivers a sterling performance, and if he doesn't at least get nominated for the Oscar, I'll be quite surprised. Emma Thompson is lovely as usual, and considering that her role spans 30 years, is quite believable both as a 20 year old and a 50 year old. Kudos to the makeup people, the aging is done both believably and tastefully.
All in all, *thumbs up*!!! See it! As soon as I find out when it opens, I'll post dates and theater. Sorry for the length of this, but I hope I was informative!
Regards to all---this is your non-critical critic signing off..
Oh, yes, I nearly forgot--disclaimer time: I'm not a professional critic (could you tell? :-) and I do not receive any remuneration for my commentary. These opinions are mine and mine alone, although you are quite welcome to share them!
Slainte'--
Jean Krevor<EMAIL_ADDRESS>.
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Glow GUI Components
A collection of all GUI elements used in Glow
Colors
Light Color Theme
- (255, 255, 255, 1)
- (50, 50, 50, 1)
- ()
- ()
- ()
Dark Color Theme
- ()
- ()
- ()
- ()
- ()
Typography
- Main Sans-Serif Font
- Source Sans Pro
- Main Serif Font
- Source Serif Pro
- Main Monospace Font
- Source Code Pro
Glow uses a sans-serif font as its standard.
This is a paragraph. Recusandae assumenda neque placeat vel exercitationem veritatis dolores. Deserunt quia inventore adipisci dolorem autem veritatis voluptas. Autem consequatur impedit voluptatem amet veritatis ratione nisi.
Here is some inline code like var = 20.4
. This is important, but that is even
more notable. There is also the possibility of marking text like so. Let's add
some superscript and subscript. What would the web be without a link?
- This is a list item.
- And another one.
- First item
- Second item
Shapes & Boxes
If possible the windows, dialoge boxes or pop-ups should aim for the golden ratio.
sharped edged box
box with rounded corners (5px)
Buttons
Inputs
- input: text
- input: color
- input: email
- input: date
- input: checkbox
- input: datetime
- input: file
- input: password
- input: search
- input: submit
- input: url
- input:
- input: radio
Tables
| Table Heading | Length |
|---|---|
| Some Data | 2 |
| Second Entry | 6 |
Notifications
Hey this is a notification! Lorem, ipsum dolor sit amet consectetur adipisicing elit.
Esse, consequatur. Expedita cupiditate pariatur fuga amet ea ratione nisi, molestias officiis sint.
Molestiae fugit vero esse odit nihil fugiat sint commodi?
This is a warning.
Something went wrong and caused an error.
Yeah! Success!
Windows
Whenever a window or a pop-up is needed, it should look like this. The background should be
muted as well (maybe b/w or blurred).


| system.file {pkgload} | R Documentation |
This function is meant to intercept calls to base::system.file()
,
so that it behaves well with packages loaded by devtools. It is made
available when a package is loaded with load_all()
.
shim_system.file(..., package = "base", lib.loc = NULL, mustWork = FALSE)
... |
character vectors, specifying subdirectory and file(s) within some package. The default, none, returns the root of the package. Wildcards are not supported. |
package |
a character string with the name of a single package. An error occurs if more than one package name is given. |
lib.loc |
a character vector with path names of R libraries.
See ‘Details’ for the meaning of the default value of |
mustWork |
logical. If |
When system.file
is called from the R console (the global
environment), this function detects if the target package was loaded with
load_all()
, and if so, it uses a customized method of searching
for the file. This is necessary because the directory structure of a source
package is different from the directory structure of an installed package.
When a package is loaded with load_all
, this function is also inserted
into the package's imports environment, so that calls to system.file
from within the package namespace will use this modified version. If this
function were not inserted into the imports environment, then the package
would end up calling base::system.file
instead.


{% extends "layouts/layout.html" %} {% block header %}
You don't have any tasks yet!
Get Busy, Friend.


REST Service - Collaborator
Add a collaborator
Collaborator List
Name
Years of experience
{{ collaborator.name }}
{{ collaborator.yoe }}


Party!
You've had a lot to drink so you make your way to the bathroom. When you
open the door you find a strange young man on the floor, reading from a
strange looking book.
  You walk back to
the party where you run into your friend Fanny Crowne. She says that she
has a new potent strain of soma that is gauranted to take you on a trip
that feels like a lunar eternity.
take the soma


Selecting any item, for example Health Condition - Heart attack, displays a list of variants or SNPs (places of potential genetic typos).
The first row for each SNP shows where the variant is: the Locus, Gene, and Variant (SNP) number.
The second row shows the normal type (e.g.; no mutation) for 23andMe data (if it exists) in black, your 23andMe data (if loaded) with normal alleles in green and mutations (polymorphisms) in red.
Stars (from 1 - 5) indicate the research quality of the SNP (per the journal ranking of the study, the number of cases and controls, etc.)
The colored blocks show which service providers cite the SNP (per color legend below), and how many studies they cite.
In Health Conditions, a mutation (polymorphism) presented in red generally indicates being at higher potential risk for developing a condition.
In Drug Response, a mutation could mean that the normal dose of the drug may not work as well, that there could be side effects, or that there could be a higher chance of addiction (for substances).
In Athletic Performance, the favorable mutation (green), suggests greater than average athletic capability.


Sylvanian Families Woodbrook Beaver Family
UK Biography Information
Mother Aubrey Woodbrook is an amazing bicyclist and loves to go with her children for a stroll around the park on sunny days.
Father Andrew Woodbrook is a fantastic carpenter and always helps his neighbors with all of their home projects.
Sister Evelyn Woodbrook spends most of her free time swimming with her friends.
Baby brother Ethan Woodbrook loves splashing around the baby pool on warm days.


xscreensaver-getimage-file(1) XScreenSaver manual xscreensaver-getimage-file(1) NAME xscreensaver-getimage-file - put a randomly-selected image on the root window SYNOPSIS xscreensaver-getimage-file [-display host:display.screen] [--verbose] [--name] directory DESCRIPTION The xscreensaver-getimage-file program is a helper program for the xscreensaver hacks that manipulate images. Specifically, it is invoked by xscreensaver-getimage(1) as needed. This is not a user-level command. This program selects a random image from disk, and loads it on the root window. It does this by figuring out which image-loading programs are installed on the system, and invoking the first one it finds. OPTIONS xscreensaver-getimage-file accepts the following options: --verbose Print diagnostics. --name Don't load an image: instead just print the file name to stdout. directory The directory to search. The directory will be searched recur‐ sively, and all files in it are assumed to be images. SEE ALSO X(1), xscreensaver(1), xscreensaver-demo(1), xscreensaver-getimage(1), xv(1), xli(1), xloadimage(1), chbg(1) COPYRIGHT Copyright © 2001 by Jamie Zawinski. Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permis‐ sion notice appear in supporting documentation. No representations are made about the suitability of this software for any purpose. It is pro‐ vided "as is" without express or implied warranty. AUTHOR Jamie Zawinski<EMAIL_ADDRESS>14-Apr-01 X Version 11 5.15 (28-Sep-2011) xscreensaver-getimage-file(1)


New Message
|
Create a new draft message. |
Open Mailbox
|
Open a mailbox on the server. |
Open Message
|
Open the selected messages. |
Open Draft
|
Open a draft message from disk. |
|
|
Import
|
Imports data. |
Export
|
Exports data. |
|
|
Close
|
Closes the top window. |
Save
|
Save the information in the top window. |
Save As
|
Save using a different file name. |
Revert
|
Discard changes in the top window. |
|
|
Preferences
|
Edit preferences. |
|
|
Disconnected
|
Switches between Connected and Disconnected state. |
Show Outgoing Queues
|
Opens the Outgoing Message Queue window. |
|
|
Page Setup
|
Change the printer and printing options. |
Print
|
Print the top window. |


{{ $ := .root }} {{ $page := .page }}
Domain of Research Learn More
Recent Publications Read More
Goodwillers Meet The Team
News Catch Up
Outreach See Gallery
Contact Us Join The Team


163. Wise King
time limit per test: 2 sec.
memory limit per test: 65536
KB
input: standard input
output: standard
output
Once upon a time in a country far away lived a king and he had a
big kingdom. He was a very wise king but he had one weakness - he could count
only up to three.
Nevertheless, he did not consider this to be a really
great drawback, since he had a lot of wizards who could count up to one hundred
(and some of them, people said, even up to one thousand). But one day the grief
came to the kingdom as the outnumbering barbarians started to approach from all
sides. And the king then had to make the most important decision in his life. He
had to choose which of his sons to make generals that he would send to the
borders of the country to lead the army.
 More precisely, he
knew about each of his sons his mental potential - an integer number ranging
from minus three to three (remember, that the king could count only up to
three). He also knew that the chance of his army defeating barbarians was
proportional to the sum of some powers of mental potentials of those of his sons
that he would make generals (the power exponent was a positive integer number,
the same for all his sons and not exceeding three either). Thus he had to choose
such a combination of his sons to lead the army, that this sum would be maximal
possible.
However, the king himself could not make all appropriate
calculations since, for example, the second power (the square) of a number not
exceeding three could be greater than three, and therefore he asked you, his
most intelligent wizard, to solve this problem.
Input
The first line of the input file contains the number of the sons
of the king (integer number less than or equal to one hundred). The second line
contains the positive integer number not exceeding three, the exponent in the
formula used to calculate the chance of defeating barbarians. The third line
contains the list of mental potentials of king's sons - all integer numbers, not
greater than three by their absolute value.
Output
Output the only number - the maximal possible chance of
defeating barbarians calculated as the sum described.
Sample test(s)
Input
In the first example below the king should choose his first and
third sons to be the generals. In this case the chance to defeat barbarians,
which is the sum of cubes of mental potentials of these sons, is eight plus one,
that is nine.
In the second example sending his son to lead the army causes
the sum to be negative, thus he should not do it and the sum would be zero.
Sample input #1
3
3
2 -1 1
Sample input #2
1
1
-1
Output
Sample output #1
9
Sample output #2
0
Note
You can download pdf version of this task
here
| Author: |
Andrew Stankevich, Andrew Lopatin, Nikolay Durov, Georgy Korneev
|
| Resource: |
ACM ICPC 2002-2003 NEERC, Northern Subregion |
| Date: |
November, 2002
|
| Server time: 2004-01-13 20:29:54 |
Online Contester Team © 2002 - 2003. All
rights
reserved. | | |


We use numerical value for columns. (e.g. A-column = 1, B-column = 2, C-column = 3, D-column = 4, E-column = 5 ...)
Steps:


Toggle navigation
Home
Download
Tutorial
FAQ
Example
Phenohub
Related projects
wANNOVAR
iCAGES
Enlight
SeqMule
Phenohub
This is where people can share and exchange their discoveries! Is it cool?
Post your result
Email
Phenotype (e.x. HP:0000028;HP:0000824;fatigue)
Disease (e.x. alzheimer's disease;cancer)
Gene (e.x. BRCA1;BRCA2)
Confidence
1 - from other species, inferred by homology
2 - from GWAS study
3 - Verified variants, from samll sample study (vs control)
4 - Verified variants, from large pedigree study (vs control)
5 - Molecular basis known
Public or private
Public - everyone can see your result
Private - your result is in our database, probably added into Phenolyzer later
Submit
Current public postings %%%%Content%%%%


Particles & Swarms
pause
🔥
It's a fiery life!
Get Blown Away!
Where is the wind coming from?
🖇
Spot
boidDebug
The Rise of the ...


On October 1, 1949 the City of New York and the Yankees celebrated “Joe DiMaggio Day” paying tribute to one of the finest players ever to play the game of baseball. Among the gifts Joe DiMaggio received that day was a 22-foot Chris Craft pleasure boat from New York Yankee fans. The prestige surrounding the Joltin’ Joe was elevated when Joe took his new bride, Marilyn Monroe, for a cruise on the San Francisco Bay in 1954 during their wedding reception.
DiMaggio had loaned the boat to numerous relatives in subsequent decades and the boat had fallen into a state of disrepair by the time it was donated to the City of Martinez (Joe’s birthplace) in 1991. The boat had deteriorated further after spending many years on display at the marina when, in 2010, the Sons of Italy, Diablo Valley Lodge #2167, took on the fundraising for a full restoration project. The Carpenters’ Union 152 joined the project and offered free labor to support the effort. Countless hours of work by volunteers have restored the Joltin’ Joe to museum-quality.


Capabilities and Perception
When I ask around how people perceive my capabilities I often get back " You are the NotesSensei, the know-it-all XPages expert close to the equator" (or something similar). While it certainly boosts my ego to be recognised as an expert in one field, it awfully feels like a case of one of the blind men describing an elephant (with my current weight I surly qualify as one). It is a dilemma that plagues me for quite a while.
In a recent internal discussion with a manager I've been told: " Your technical credentials are impressive, so you must lack on the business side". What an interesting conclusion. I ran my own business, started of way below zero funds and survived, I moved to another continent, rebuild my business with no contacts when I came here and survived. I survived law suites, fraudulent business partners and quite a number of organisations that looked down on my business (" Will you be still around next year?" - Yes I was and they were gone). But being technically sound I was put into the "must lack in business" drawer. I wonder what a typical manager's survival rate would be, if stripped of all minions that do the actual work.
A lot of times people act surprised when they learn that I didn't study computer science but studied economics during national service and thereafter attended law school (later in Franfurt), where I dropped out the year my father died (and settled with his debt I started my first company). I learned negotiating the hard way then.
Constant learning was always something I enjoyed, so naturally I soaked up the then nascent field of eLearning. While running the first company, where we build PCs from components as well as our very own hardware, I honed my interpersonal skills by becoming a GPK certified " Counsellor for personcentric development" (Read about Carl Rogers to get an idea what personcentric means).
Yes, there was a lot of technology along the path. I administered a IBM System /36 and helped law firms and a large Credit Management Company to manage their software (working with some political talent there). There I wrote COBOL and dBASE/Foxpro applications that seamlessly transferred data between PC and the IBM system. I advised software companies that served the legal market.
I wrote a mini ERP for a precision engineering and manufacturing company, while providing network support for a large chemical company (so I know networks from PC-LAN, Novell, LAN-Manager to SNA).
Airlines (that was cool, got a private tour visiting a Concorde, unfortunately grounded only), advertisement agencies and retailers were in my customer list (I know a lot about variation management in office furniture, made me a USM Haller fan). I wrote (in VB) the advertisement positioning module for a private TV station.
I worked as a "holiday rep" in Aldiana providing PC training in the early days (the machines had 2 Floppy drives only), taught me a lot about people and picking orders and how to break down complex topics into digestible units. My biggest public recognitions don't carry my name, but have my impact written all over them: I designed eGovernment software (C++, J2EE, XForms, webDAV, Oracle) that won a German price and eLearning software (in VB.NET) that won an APICTA award. I build social software when it wasn't called that for knowledge sharing and I never shy away from implementing change (which falls firmly into the soft skills dimension).
So there is more to me than "The Notes expert". While I carefully crafted the visibility of this expertise, I haven't shown much of the other areas since it opens the opposite trap: " With that broad knowledge he can't be a deep expert" (despite all HR mumblings about T-shape skill development). What should I do? Stay tuned.
In a recent internal discussion with a manager I've been told: " Your technical credentials are impressive, so you must lack on the business side". What an interesting conclusion. I ran my own business, started of way below zero funds and survived, I moved to another continent, rebuild my business with no contacts when I came here and survived. I survived law suites, fraudulent business partners and quite a number of organisations that looked down on my business (" Will you be still around next year?" - Yes I was and they were gone). But being technically sound I was put into the "must lack in business" drawer. I wonder what a typical manager's survival rate would be, if stripped of all minions that do the actual work.
A lot of times people act surprised when they learn that I didn't study computer science but studied economics during national service and thereafter attended law school (later in Franfurt), where I dropped out the year my father died (and settled with his debt I started my first company). I learned negotiating the hard way then.
Constant learning was always something I enjoyed, so naturally I soaked up the then nascent field of eLearning. While running the first company, where we build PCs from components as well as our very own hardware, I honed my interpersonal skills by becoming a GPK certified " Counsellor for personcentric development" (Read about Carl Rogers to get an idea what personcentric means).
Yes, there was a lot of technology along the path. I administered a IBM System /36 and helped law firms and a large Credit Management Company to manage their software (working with some political talent there). There I wrote COBOL and dBASE/Foxpro applications that seamlessly transferred data between PC and the IBM system. I advised software companies that served the legal market.
I wrote a mini ERP for a precision engineering and manufacturing company, while providing network support for a large chemical company (so I know networks from PC-LAN, Novell, LAN-Manager to SNA).
Airlines (that was cool, got a private tour visiting a Concorde, unfortunately grounded only), advertisement agencies and retailers were in my customer list (I know a lot about variation management in office furniture, made me a USM Haller fan). I wrote (in VB) the advertisement positioning module for a private TV station.
I worked as a "holiday rep" in Aldiana providing PC training in the early days (the machines had 2 Floppy drives only), taught me a lot about people and picking orders and how to break down complex topics into digestible units. My biggest public recognitions don't carry my name, but have my impact written all over them: I designed eGovernment software (C++, J2EE, XForms, webDAV, Oracle) that won a German price and eLearning software (in VB.NET) that won an APICTA award. I build social software when it wasn't called that for knowledge sharing and I never shy away from implementing change (which falls firmly into the soft skills dimension).
So there is more to me than "The Notes expert". While I carefully crafted the visibility of this expertise, I haven't shown much of the other areas since it opens the opposite trap: " With that broad knowledge he can't be a deep expert" (despite all HR mumblings about T-shape skill development). What should I do? Stay tuned.
Posted by Stephan H Wissel on 14 August 2011 | Comments (3) | categories: After hours


Follow us on Twitter for a daily dose of Python, News and Articles 🖤 Use ctrl+z to open the quick search.


{% extends "base.html" %} {% load i18n %} {% load staticfiles %} {% block head %} {% endblock %} {% block title %}Find Your Legislator{% endblock title %} {% block subtitle %}Enter an address to find your Senator and Representative{% endblock subtitle %} {% block colclass %} col-md-6 {% endblock %} {% block content %}
{% include "preferences/location_form.html" %}{{ error_message }}
Your senator is:
No senator found
{% endif %}Your representative is:
{{ address_representative.name }}
No representative found
{% endif %}Recently Sponsored Legislation
{{ address_senator.name }}
{{ address_representative.name }}


|
Panda3D
|
A temporary file to hold the vertex data that has been evicted from memory and written to disk. More...
Public Member Functions | |
| int | getTotalFileSize () |
| Returns the amount of space consumed by the save file, including unused portions. More... | |
| int | getUsedFileSize () |
| Returns the amount of space within the save file that is currently in use. More... | |
| bool | isValid () |
| Returns true if the save file was successfully created and is ready for use, false if there was an error. More... | |
| Public Member Functions inherited from SimpleAllocator | |
| __init__ (int max_size, Mutex lock) | |
| __init__ (SimpleAllocator from) | |
| Move constructor. More... | |
| SimpleAllocatorBlock | alloc (int size, int alignment) |
| Allocates a new block. More... | |
| int | getContiguous () |
| Returns an upper-bound estimate of the size of the largest contiguous block that may be allocated. More... | |
| SimpleAllocatorBlock | getFirstBlock () |
| Returns a pointer to the first allocated block, or NULL if there are no allocated blocks. More... | |
| int | getMaxSize () |
| Returns the available space for allocated objects. More... | |
| int | getTotalSize () |
| Returns the total size of allocated objects. More... | |
| bool | isEmpty () |
| Returns true if there are no blocks allocated on this page, or false if there is at least one. More... | |
| output (Ostream out) | |
| setMaxSize (int max_size) | |
| Changes the available space for allocated objects. More... | |
| write (Ostream out) | |
A temporary file to hold the vertex data that has been evicted from memory and written to disk.
All vertex data arrays are written into one large flat file.
| int getTotalFileSize | ( | ) |
Returns the amount of space consumed by the save file, including unused portions.
| int getUsedFileSize | ( | ) |
Returns the amount of space within the save file that is currently in use.
| bool isValid | ( | ) |
Returns true if the save file was successfully created and is ready for use, false if there was an error.


Typically, the document's size will be independent of the view's size. The visual relationship between the two is maintained with the use of scrollers. In these situations, the view will size itself according to the size of its parent Primary window. However, you can change the sizing behavior of the view simply by setting attributes or applying hints.
HINT_INITIAL_SIZE, HINT_MINIMUM_SIZE, HINT_MAXIMUM_SIZE, HINT_FIXED_SIZE
Although the view normally sizes itself to fit the specifications of its parent window, you can change this behavior by applying one of four hints or by setting vertical or horizontal attributes.
HINT_INITIAL_SIZE
This hint sets the initial size of the view to a given width and height. The view window will never shrink smaller than the size set with this hint.
HINT_MINIMUM_SIZE
This hint sets the smallest possible size of the view window. The view's initial size is unaffected by this hint except to ensure that the parent Primary opens large enough to accommodate the view window.
HINT_MAXIMUM_SIZE
This hint sets the maximum allowable size of the view window. This may be used in place of or in addition to the document bounds.
HINT_FIXED_SIZE
This hint has the effect of setting initial, minimum, and maximum sizes at once to set a permanent size for the view window.
All the above hints deal with the structure
CompSizeHintArgs
. This structure allows specification of size in any of a number of different formats including pixels, percentage of screen size, multiples of character widths, number of text lines, and others.
You may also set GVDA_NO_LARGER_THAN_CONTENT and/or GVDA_NO_SMALLER_THAN_CONTENT in the
GVI_horizAttrs
and
GVI_vertAttrs
attribute fields to ensure that the view stays with the content's size. These attributes can be set as follows:
GVI_horizAttrs = @default | GVDA_NO_LARGER_THAN_CONTENT | GVDA_NO_SMALLER_THAN_CONTENT;
GVI_vertAttrs = @default | GVDA_NO_LARGER_THAN_CONTENT | GVDA_NO_SMALLER_THAN_CONTENT;
The above lines will ensure that the view will remain exactly the same size as the content (within screen boundaries).
You can also instruct the view window to snap its width or height to a multiple of the current horizontal or vertical increment. To do this, set the
GVI_vertAttrs
or
GVI_horizAttrs
attribute GVDA_SIZE_A_MULTIPLE_OF_INCREMENT as below:
GVI_horizAttrs = @default | GVDA_SIZE_A_MULTIPLE_OF_INCREMENT;
GVI_vertAttrs = @default | GVDA_SIZE_A_MULTIPLE_OF_INCREMENT;
HINT_VIEW_LEAVE_ROOM_FOR_VERT_SCROLLER, HINT_VIEW_LEAVE_ROOM_FOR_HORIZ_SCROLLER
Occasionally, you may want to leave extra room for scroller objects even when your view will not have scrollers. You can do so with the hints
HINT_VIEW_LEAVE_ROOM_FOR_VERT_SCROLLER
and
HINT_VIEW_LEAVE_ROOM_FOR_HORIZ_SCROLLER
. Although these hints will not affect the size of the view's window, they will affect the view's geometry with respect to its parent window.
MSG_GEN_VIEW_CALC_WIN_SIZE
When determining its size initially, the view sends itself the message
MSG_GEN_VIEW_CALC_WIN_SIZE
. This message, while not useful to applications in and of itself, may be subclassed to get special window sizing behavior. When this message is sent, it includes a suggested window size; by subclassing the GenView and altering the functionality of this message, you can return a different suggested size. The new suggestion will be used to set the view's new size, except at very small sizes--the view will make itself large enough to show scrollers and other children if required.
SizeAsDWord MSG_GEN_VIEW_CALC_WIN_SIZE( word width, /* suggested new width of view window */ word height); /* suggested new height of view window */
This message is sent by the view to itself when it is first being initialized. It takes a suggested size and returns a new suggested size, adjusted for specific conditions.
Source: Unrestricted.
Destination: Any GenView object.
Parameters:
width
The new suggested width of the view window.
height
Return: A dword representing both the height and the width determined by the method. The width occupies the low word, and the height occupies the high word.
Interception: If you require special sizing behavior from your GenView window, subclass this method. Be sure to call the superclass in the handler.


Given the array:
private int[] counts = {7, 12, 3, 56, 11, 9, 18 }
And the selection sort from the video demo What is the value of lh when the array is put in this state:
{3, 7, 9, 11, 56, 12, 18 }
There are no hints for this question


Formal Scripts are great typefaces to suggest elegance, quality, refinement and luxury. They are used a lot in print publishing, but you don't see many formal scripts used on the web. Isn't it? Mostly because their tiny hairlines breaks and disappear when used at small sizes on the screen.
Also, they usually have long ascenders and descenders, and the lowercase letters look too small when compared to most sans or serif fonts. More over, they are usually quite condensed, making them even more difficult to read.
That's why we designed a script type specifically tailored for web use, that can survive being set even as small as 13px.


#include <Nano1X2Series.h>
@addtogroup FMC Flash Memory Controller(FMC)
Memory Mapped Structure for FMC Controller
Definition at line 2468 of file Nano1X2Series.h.
◆ DFBADR
| __I uint32_t FMC_T::DFBADR |
DFBADR
Offset: 0x14 Data Flash Base Address Register
| Bits | Field | Descriptions |
| [31:0] | DFBADR | Data Flash Base Address |
| | This register indicates data flash start address. It is a read only register. |
| | The data flash start address is defined by user. |
| | Since on chip flash erase unit is 512 bytes, it is mandatory to keep bit 8-0 as 0. |
Definition at line 2581 of file Nano1X2Series.h.
◆ ISPADR
| __IO uint32_t FMC_T::ISPADR |
ISPADR
Offset: 0x04 ISP Address Register
| Bits | Field | Descriptions |
| [31:0] | ISPADR | ISP Address |
| | This chip supports word program only. |
| | ISPADR[1:0] must be kept 00b for ISP operation, and ISPADR[8:0] must be kept all 0 for Vector Page Re-map Command. |
Definition at line 2519 of file Nano1X2Series.h.
◆ ISPCMD
| __IO uint32_t FMC_T::ISPCMD |
ISPCMD
Offset: 0x0C ISP Command Register
| Bits | Field | Descriptions |
| [3:0] | FCTRL | ISP Command |
| | The ISP command table is shown as follows |
| | Read (FOEN = 0, FCEN = 0, FCRTL = 0000) |
| | Program (FOEN = 1, FCEN = 0, FCRTL = 0001) |
| | Page Erase (FOEN = 1, FCEN = 0, FCRTL = 0010) |
| | Read CID (FOEN = 0, FCEN = 0, FCRTL = 1011) |
| | Read DID (FOEN = 0, FCEN = 0, FCRTL = 1100) |
| [4] | FCEN | ISP Command |
| | The ISP command table is shown as above. |
| [5] | FOEN | ISP Command |
| | The ISP command table is shown as above. |
Definition at line 2553 of file Nano1X2Series.h.
◆ ISPCON
| __IO uint32_t FMC_T::ISPCON |
ISPCON
Offset: 0x00 ISP Control Register
| Bits | Field | Descriptions |
| [0] | ISPEN | ISP Enable Control (Write Protect) |
| | ISP function enable bit. Set this bit to enable ISP function. |
| | 0 = ISP function Disabled. |
| | 1 = ISP function Enabled. |
| [1] | BS | Boot Select (Write Protect) |
| | Set/clear this bit to select next booting from LDROM/APROM, respectively. |
| | This bit also functions as chip booting status flag, which can be used to check where chip booted from. |
| | This bit is initiated with the inversed value of CBS in Config0 after power-on reset; It keeps the same value at other reset. |
| | 0 = Boot from APROM. |
| | 1 = Boot from LDROM. |
| [3] | APUEN | APROM Update Enable Control (Write Protect) |
| | 0 = APROM cannot be updated. |
| | 1 = APROM can be updated. |
| [4] | CFGUEN | Enable Config-Bits Update By ISP (Write Protect) |
| | 0 = ISP update User Configuration Disabled. |
| | 1 = ISP update User Configuration Enabled. |
| [5] | LDUEN | LDROM Update Enable Control (Write Protect) |
| | 0 = LDROM cannot be updated. |
| | 1 = LDROM can be updated. |
| [6] | ISPFF | ISP Fail Flag (Write Protect) |
| | This bit is set by hardware when a triggered ISP meets any of the following conditions: |
| | (1) APROM writes to itself if APUEN is set to 0 or CBS[0]=1. |
| | (2) LDROM writes to itself if LDUEN is set to 0 or CBS[0]=1. |
| | (3) User Configuration is erased/programmed when CFGUEN is 0. |
| | (4) Destination address is illegal, such as over an available range. |
| | Note: Write 1 to clear this bit to 0. |
Definition at line 2506 of file Nano1X2Series.h.
◆ ISPDAT
| __IO uint32_t FMC_T::ISPDAT |
ISPDAT
Offset: 0x08 ISP Data Register
| Bits | Field | Descriptions |
| [31:0] | ISPDAT | ISP Data |
| | Write data to this register before ISP program operation |
| | Read data from this register after ISP read operation |
Definition at line 2532 of file Nano1X2Series.h.
◆ ISPSTA
| __I uint32_t FMC_T::ISPSTA |
ISPSTA
Offset: 0x40 ISP Status Register
| Bits | Field | Descriptions |
| [0] | ISPBUSY | ISP Busy (Read Only) |
| | 0 = ISP operation is finished. |
| | 1 = ISP operation is busy. |
| [2:1] | CBS | Config Boot Selection Status (Read Only) |
| | This filed is a mirror of CBS in CONFIG0. |
| [5] | PGFF | Auto Flash Program Verified Fail Flag |
| | This chip will perform flash verification automatically at the end of ISP PROGRAM operation, and set 1 to this bit when flash data is not matched with programming. |
| | This bit is clear to 0 by "ERASE" command. |
| [6] | ISPFF | ISP Fail Flag |
| | (1) APROM writes to itself if APUEN is set to 0 or CBS[0]=1. |
| | (2) LDROM writes to itself if LDUEN is set to 0 or CBS[0]=1. |
| | (3) User Configuration is erased/programmed when CFGUEN is 0. |
| | (4) Destination address is illegal, such as over an available range. |
| | Note: Write 1 to clear this bit to 0. |
Definition at line 2607 of file Nano1X2Series.h.
◆ ISPTRG
| __IO uint32_t FMC_T::ISPTRG |
ISPTRG
Offset: 0x10 ISP Trigger Register
| Bits | Field | Descriptions |
| [0] | ISPGO | ISP Start Trigger |
| | Write 1 to start ISP operation and this bit will be cleared to 0 by hardware automatically when ISP operation is finished. |
| | 0 = ISP operation is finished. |
| | 1 = ISP is progressing. |
Definition at line 2567 of file Nano1X2Series.h.
◆ RESERVE0
| uint32_t FMC_T::RESERVE0[10] |
The documentation for this struct was generated from the following file:


---
layout: post
title: La traversée
date: '2016-04-10T16:56:39+02:00'
categories:
- Grand Froid
- Storyboards
- Set Design
picture_url: https://film-Storyboards.tumblr.com/post/142594266066
---
Madame Cisca traverse la rue à Jemappes. Street set, snow sfx production drawing for Grand Froid.


First and foremost, here you will find my resume.
If only the first page shows and is "stretched" on mobile, the PDF can be downloaded here: Sean M Meehan Resume
Below is my teaching portfolio from my time at Ohio State. I composed this to explain my methods of teaching math and science, and this submission allowed me to enter and win the Graduate Associate Teaching Award at OSU, granted to just 10 out of 11,000+ graduate students. I find this document incredibly relevant to my data science career - the ability to explain abstract mathematical concepts, such as the inner-workings of a model, is of extreme importance to the field because you'll often be "selling" the model to higher-ups who may not have the same mathematical intuition that you do.
The second and third paragraph on page "Meehan 2" may be the most relevant; feel free to ignore the reflections on office hours, exam prep, etc.
If only the first page shows and is "stretched" on mobile, the PDF can be downloaded here: Sean M Meehan Teaching Portfolio
I've also attached the document I'm most proud of - my Ph.D. thesis.
If only the first page shows and is "stretched" on mobile, the PDF can be downloaded here: Sean Meehan - On Some Universality Problems in Combinatorial Random Matrix Theory.pdf