Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add text segmentation example #142

Merged
merged 33 commits into from
May 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
519f673
doc(text): create first sandbox notebook
oboulant Jan 29, 2021
f47b8ed
Add work in progress notebooks for various approaches
oboulant Feb 25, 2021
97b5db0
docs: refine notebook
oboulant Mar 22, 2021
80d334a
docs: add text segmentation to examples
oboulant Mar 22, 2021
5a84aa4
docs: add text segmentation example data
oboulant Mar 22, 2021
3a54e17
docs: add text segmentation sample data snapshot
oboulant Mar 22, 2021
279bd0a
chore: merge master into current branch
oboulant Mar 22, 2021
e93299a
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Mar 22, 2021
3acb465
docs: re-arrange import cell
oboulant Mar 22, 2021
3d62626
docs: pre-commit stuffs
oboulant Mar 22, 2021
5180354
docs: delete sandbox
oboulant Mar 22, 2021
8a23776
docs: fix path error
oboulant Mar 22, 2021
ef86105
docs: image path
oboulant Mar 22, 2021
8b1da98
docs: minor adjustments
oboulant Mar 22, 2021
eb7860b
docs: add binder dependencies
oboulant Mar 23, 2021
acb83d1
docs: corrections notebook
deepcharles Apr 14, 2021
5f1876f
docs: add data for text seg example
deepcharles Apr 20, 2021
8de8b3a
docs: remove old data for text seg example
deepcharles Apr 20, 2021
cd0c52f
docs: add text seg corrections
deepcharles Apr 20, 2021
37ee396
docs: typos
deepcharles Apr 20, 2021
2d60a17
docs: typo
deepcharles Apr 20, 2021
6bdb535
style: remove old image
deepcharles Apr 20, 2021
a85e5dd
style: fix link in notebook example
deepcharles Apr 21, 2021
502fe88
docs: add gram representation
oboulant Apr 22, 2021
4141de9
docs: modify text segmentation notebook
deepcharles Apr 26, 2021
72cbd6b
docs: add authors
oboulant Apr 26, 2021
006bf4e
chore: change max number of parallel jobs for matrix strategy
oboulant Apr 28, 2021
12b8c6e
chore: max-parallel should be under strategy and not matrix
oboulant Apr 28, 2021
93b5f70
chore: trying without python v3.6
oboulant Apr 28, 2021
7b5011e
chore: flatten tests on os
oboulant Apr 29, 2021
2317313
chore: trying not to upgrade pip
oboulant Apr 30, 2021
2177a9f
chore: revert commits debugging run-test Gh Actions
oboulant Apr 30, 2021
0a9ccbe
chore: Merge branch 'master' into example-text
oboulant May 3, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .binder/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
matplotlib
ruptures
librosa
nltk
3 changes: 0 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,4 @@ repos:
rev: 0.7.0
hooks:
- id: nbqa-black
args: [--nbqa-mutate]
- id: nbqa-isort
additional_dependencies: [isort==5.6.4]
args: [--nbqa-mutate]
99 changes: 99 additions & 0 deletions docs/data/text-segmentation-data.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
The Sane Society is an ambitious work .
Its scope is as broad as the question : What does it mean to live in modern society ? ?
A work so broad , even when it is directed by a leading idea and informed by a moral vision , must necessarily `` fail '' .
Even a hasty reader will easily find in it numerous blind spots , errors of fact and argument , important exclusions , areas of ignorance and prejudice , undue emphases on trivia , examples of broad positions supported by flimsy evidence , and the like .
Such books are easy prey for critics .
Nor need the critic be captious .
A careful and orderly man , who values precision and a kind of tough intellectual responsibility , might easily be put off by such a book .
It is a simple matter , for one so disposed , to take a work like The Sane Society and shred it into odds and ends .
The thing can be made to look like the cluttered attic of a large and vigorous family -- a motley jumble of discarded objects , some outworn and some that were never useful , some once whole and bright but now chipped and tarnished , some odd pieces whose history no one remembers , here and there a gem , everything fascinating because it suggests some part of the human condition -- the whole adding up to nothing more than a glimpse into the disorderly history of the makers and users .
That could be easily done , but there is little reason in it .
It would come down to saying that Fromm paints with a broad brush , and that , after all , is not a conclusion one must work toward but an impression he has from the outset .
the effect of the digitalis glycosides is inhibited by a high concentration of potassium in the incubation medium and is enhanced by the absence of potassium ( Wolff , 1960 ) .
B. Organification of iodine The precise mechanism for organification of iodine in the thyroid is not as yet completely understood .
However , the formation of organically bound iodine , mainly mono-iodotyrosine , can be accomplished in cell-free systems .
In the absence of additions to the homogenate , the product formed is an iodinated particulate protein ( Fawcett and Kirkwood , 1953 ; ; Taurog , Potter and Chaikoff , 1955 ; ; Taurog , Potter , Tong , and Chaikoff , 1956 ; ; Serif and Kirkwood , 1958 ; ; De Groot and Carvalho , 1960 ) .
This iodoprotein does not appear to be the same as what is normally present in the thyroid , and there is no evidence so far that thyroglobulin can be iodinated in vitro by cell-free systems .
In addition , the iodoamino acid formed in largest quantity in the intact thyroid is di-iodotyrosine .
If tyrosine and a system generating hydrogen peroxide are added to a cell-free homogenate of the thyroid , large quantities of free mono-iodotyrosine can be formed ( Alexander , 1959 ) .
It is not clear whether this system bears any resemblance to the in vivo iodinating mechanism , and a system generating peroxide has not been identified in thyroid tissue .
On chemical grounds it seems most likely that iodide is first converted to Afj and then to Afj as the active iodinating species .
the statement empirical , for goodness was not a quality like red or squeaky that could be seen or heard .
What were they to do , then , with these awkward judgments of value ? ?
To find a place for them in their theory of knowledge would require them to revise the theory radically , and yet that theory was what they regarded as their most important discovery .
It appeared that the theory could be saved in one way only .
If it could be shown that judgments of good and bad were not judgments at all , that they asserted nothing true or false , but merely expressed emotions like `` Hurrah '' or `` Fiddlesticks '' , then these wayward judgments would cease from troubling and weary heads could be at rest .
This is the course the positivists took .
They explained value judgments by explaining them away .
Now I do not think their view will do .
But before discussing it , I should like to record one vote of thanks to them for the clarity with which they have stated their case .
It has been said of John Stuart Mill that he wrote so clearly that he could be found out .
Greer Garson , world-famous star of stage , screen and television , will be honored for the high standard in tasteful sophisticated fashion with which she has created a high standard in her profession .
As a Neiman-Marcus award winner the titian-haired Miss Garson is a personification of the individual look so important to fashion this season .
She will receive the 1961 `` Oscar '' at the 24th annual Neiman-Marcus Exposition , Tuesday and Wednesday in the Grand Ballroom of the Sheraton-Dallas Hotel .
The only woman recipient , Miss Garson will receive the award with Ferdinando Sarmi , creator of chic , beautiful women 's fashions ; ; Harry Rolnick , president of the Byer-Rolnick Hat Corporation and designer of men 's hats ; ; Sydney Wragge , creator of sophisticated casuals for women and Roger Vivier , designer of Christian Dior shoes Paris , France , whose squared toes and lowered heels have revolutionized the shoe industry .
The silver and ebony plaques will be presented at noon luncheons by Stanley Marcus , president of Neiman-Marcus , Beneficiary of the proceeds from the two showings will be the Dallas Society for Crippled Children Cerebral Palsy Treatment Center .
The attractive Greer Garson , who loves beautiful clothes and selects them as carefully as she does her professional roles , prefers timeless classical designs .
Occasionally she deserts the simple and elegant for a fun piece simply because `` It 's unlike me '' .
In private life , Miss Garson is Mrs. E.E. Fogelson and on the go most of the time commuting from Dallas , where they maintain an apartment , to their California home in Los Angeles ' suburban Bel-Air to their ranch in Pecos , New Mexico .
Therefore , her wardrobe is largely mobile , to be packed at a moment 's notice and to shake out without a wrinkle .
Her creations in fashion are from many designers because she does n't want a complete wardrobe from any one designer any more than she wants `` all of her pictures by one painter '' .
Wage-price policies of industry are the result of a complex of forces -- no single explanation has been found which applies to all cases .
The purpose of this paper is to analyze one possible force which has not been treated in the literature , but which we believe makes a significant contribution to explaining the wage-price behavior of a few very important industries .
While there may be several such industries to which the model of this paper is applicable , the authors make particular claim of relevance to the explanation of the course of wages and prices in the steel industry of the United States since World War 2 .
Indeed , the apparent stiffening of the industry 's attitude in the recent steel strike has a direct explanation in terms of the model here presented .
The model of this paper considers an industry which is not characterized by vigorous price competition , but which is so basic that its wage-price policies are held in check by continuous critical public scrutiny .
Where the industry 's product price has been kept below the `` profit-maximizing '' and `` entry-limiting '' prices due to fears of public reaction , the profit seeking producers have an interest in offering little real resistance to wage demands .
The contribution of this paper is a demonstration of this proposition , and an exploration of some of its implications .
In order to focus clearly upon the operation of this one force , which we may call the effect of `` public-limit pricing '' on `` key '' wage bargains , we deliberately simplify the model by abstracting from other forces , such as union power , which may be relevant in an actual situation .
For expository purposes , this is best treated as a model which spells out the conditions under which an important industry affected with the public interest would find it profitable to raise wages even in the absence of union pressures for higher wages .
The vast Central Valley of California is one of the most productive agricultural areas in the world .
During the summer of 1960 , it became the setting for a bitter and basic labor-management struggle .
The contestants in this economic struggle are the Agricultural Workers Organizing Committee ( AWOC ) of the AFL-CIO and the agricultural employers of the State .
By virtue of the legal responsibilities of the Department of Employment in the farm placement program , we necessarily found ourselves in the middle between these two forces .
It is not a pleasant or easy position , but one we have endeavored to maintain .
We have sought to be strictly neutral as between the parties , but at the same time we have been required frequently to rule on specific issues or situations as they arose .
Inevitably , one side was pleased and the other displeased , regardless of how we ruled .
Often the displeased parties interpreted our decision as implying favoritism toward the other .
We have consoled ourselves with the thought that this is a normal human reaction and is one of the consequences of any decision in an adversary proceeding .
It is disconcerting , nevertheless , to read in a labor weekly , `` Perluss knuckles down to growers '' , and then to be confronted with a growers ' publication which states , `` Perluss recognizes obviously phony and trumped-up strikes as bona fide '' .
Rookie Ron Nischwitz continued his pinpoint pitching Monday night as the Bears made it two straight over Indianapolis , 5-3 .
The husky 6-3 , 205-pound lefthander , was in command all the way before an on-the-scene audience of only 949 and countless of television viewers in the Denver area .
It was Nischwitz ' third straight victory of the new season and ran the Grizzlies ' winning streak to four straight .
They now lead Louisville by a full game on top of the American Association pack .
Nischwitz fanned six and walked only Charley Hinton in the third inning .
He has given only the one pass in his 27 innings , an unusual characteristic for a southpaw .
The Bears took the lead in the first inning , as they did in Sunday 's opener , and never lagged .
Dick McAuliffe cracked the first of his two doubles against Lefty Don Rudolph to open the Bear 's attack .
After Al Paschal gruonded out , Jay Cooke walked and Jim McDaniel singled home McAuliffe .
Alusik then moved Cooke across with a line drive to left .
Unemployed older workers who have no expectation of securing employment in the occupation in which they are skilled should be able to secure counseling and retraining in an occupation with a future .
Some vocational training schools provide such training , but the current need exceeds the facilities .
Current programs The present Federal program of vocational education began in 1917 with the passage of the Smith-Hughes Act , which provided a continuing annual appropriation of $ 7 million to support , on a matching basis , state-administered programs of vocational education in agriculture , trades , industrial skills and home economics .
Since 1917 some thirteen supplementary and related acts have extended this Federal program .
The George-Barden Act of 1946 raised the previous increases in annual authorizations to $ 29 million in addition to the $ 7 million under the Smith Act .
The Health Amendment Act of 1956 added $ 5 million for practical nurse training .
The latest major change in this program was introduced by the National Defense Education Act of 1958 , Title 8 , of which amended the George-Barden Act .
Annual authorizations of $ 15 million were added for area vocational education programs that meet national defense needs for highly skilled technicians .
The Federal program of vocational education merely provides financial aid to encourage the establishment of vocational education programs in public schools .
The initiative , administration and control remain primarily with the local school districts .
Even the states remain primarily in an assisting role , providing leadership and teacher training .
briefly , the topping configuration must be examined for its inferences .
Then the fact that the lower channel line was pierced had further forecasting significance .
And then the application of the count rules to the width ( horizontally ) of the configuration gives us an intial estimate of the probable depth of the decline .
The very idea of there being `` count rules '' implies that there is some sort of proportion to be expected between the amount of congestive activity and the extent of the breakaway ( run up or run down ) movement .
This expectation is what really `` sold '' point and figure .
But there is no positive and consistently demonstrable relationship in the strictest sense .
Experience will show that only the vaguest generalities apply , and in fine , these merely dwell upon a relationship between the durations and intensities of events .
After all , too much does not happen too suddenly , nor does very little take long .
The advantages and disadvantages of these two types of charting , bar charting and point and figure charting , remain the subject of fairly good-natured litigation among their respective professional advocates , with both methods enjoying in common , one irrevocable merit .
They are both trend-following methods .
Miami , Fla. , March 17 -- The Orioles tonight retained the distinction of being the only winless team among the eighteen Major-League clubs as they dropped their sixth straight spring exhibition decision , this one to the Kansas City Athletics by a score of 5 to 3 .
Indications as late as the top of the sixth were that the Birds were to end their victory draught as they coasted along with a 3-to-o advantage .
Siebern hits homer Over the first five frames , Jack Fisher , the big righthander who figures to be in the middle of Oriole plans for a drive on the 1961 American League pennant , held the A 's scoreless while yielding three scattered hits .
Then Dick Hyde , submarine-ball hurler , entered the contest and only five batters needed to face him before there existed a 3-to-3 deadlock .
A two-run homer by Norm Siebern and a solo blast by Bill Tuttle tied the game , and single runs in the eighth and ninth gave the Athletics their fifth victory in eight starts .
House throws wild With one down in the eighth , Marv Throneberry drew a walk and stole second as Hyde fanned Tuttle .
Catcher Frank House 's throw in an effort to nab Throneberry was wide and in the dirt .
Then Heywood Sullivan , Kansas City catcher , singled up the middle and Throneberry was across with what proved to be the winning run .
Rookie southpaw George Stepanovich relieved Hyde at the start of the ninth and gave up the A 's fifth tally on a walk to second baseman Dick Howser , a wild pitch , and Frank Cipriani 's single under Shortstop Jerry Adair 's glove into center .
20 changes: 15 additions & 5 deletions docs/examples/music-segmentation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,13 @@
"source": [
"# Music segmentation\n",
"\n",
"<!-- {{ add_binder_block(page) }} -->\n",
"\n",
"<!-- {{ add_binder_block(page) }} -->"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Introduction\n",
"\n",
"Music segmentation can be seen as a change point detection task and therefore can be carried out with `ruptures`.\n",
Expand All @@ -21,8 +26,13 @@
"\n",
"In this example, we use the well-known tempogram representation, which is based on the onset strength envelope of the input signal, and captures tempo information [[Grosche2010]](#Grosche2010).\n",
"\n",
"To load and manipulate sound data, we use the [librosa package](https://librosa.org/doc/latest/index.html) [[McFee2015]](#McFee2015).\n",
"\n",
"To load and manipulate sound data, we use the [librosa package](https://librosa.org/doc/latest/index.html) [[McFee2015]](#McFee2015)."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Setup\n",
"\n",
"First, we make the necessary imports."
Expand Down Expand Up @@ -342,7 +352,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.1"
"version": "3.9.4"
},
"toc-autonumbering": false,
"toc-showmarkdowntxt": false
Expand Down
Loading