R: tm package stemCompletion Error (with data) - r

I have 2 speech data in 2 separate text files. I have attached the speech data at the bottom of this question, since most questions on tm do not provide data and make it difficult for others to answer their questions. And I created a corpus based on these 2 text files.
Then I applied transformation to these speech data. All work perfectly except for the stemCompletion step.
corpus.tmp <- tm_map(corpus, removePunctuation)
# remove whitespace
corpus.tmp <- tm_map(corpus.tmp, stripWhitespace)
# convert to lower case letters
#
#corpus.tmp <- tm_map(corpus.tmp, tolower)
corpus.tmp <- tm_map(corpus.tmp, content_transformer(tolower))
# remove stopwords
corpus.tmp <- tm_map(corpus.tmp, removeWords, c(stopwords("english"), "tweet", "views", "mitt", "romney", "obama", "barack"))
# stemming
corpus.tmp <- tm_map(corpus.tmp, stemDocument, language = "english")
corpus.tmp <- tm_map(corpus.tmp, stemCompletion, dictionary = corpus.tmp)
I ran into the following error, but that's not it. When I inspect the corpus, the content all became error messages. Can someone tell me what went wrong? How to fix it?
Warning message:
In mclapply(content(x), FUN, ...) :
all scheduled cores encountered errors in user code
Browse[1]> inspect(corpus.tmp)
<<VCorpus (documents: 2, metadata (corpus/indexed): 0/0)>>
inspect(corpus.tmp)
[[1]]
[1] "Error in setNames(if (length(n)) n else rep(NA, length(x)), x) : \n 'names' attribute [60] must be the same length as the vector [2]\n"
attr(,"class")
[1] "try-error"
attr(,"condition")
<simpleError in setNames(if (length(n)) n else rep(NA, length(x)), x): 'names' attribute [60] must be the same length as the vector [2]>
[[2]]
[1] "Error in setNames(if (length(n)) n else rep(NA, length(x)), x) : \n 'names' attribute [61] must be the same length as the vector [2]\n"
attr(,"class")
[1] "try-error"
attr(,"condition")
<simpleError in setNames(if (length(n)) n else rep(NA, length(x)), x): 'names' attribute [61] must be the same length as the vector [2]>
The 2 separate text files are as follow:
[[1]]
<<PlainTextDocument (metadata: 7)>>
07/29/12 – Mitt Romney’s Policy Speech in Jerusalem
Tweet
Thank you for that kind introduction, Mayor Barkat, and thank you all for that warm welcome. It’s a pleasure and a privilege to be in Israel again.
To step foot into Israel is to step foot into a nation that began with an ancient promise made in this land. The Jewish people persisted through one of the most monstrous crimes in human history, and now this nation has come to take its place among the most impressive democracies on earth. Israel’s achievements are a wonder of the modern world.
These achievements are a tribute to the resilience of the Israeli people. You have managed, against all odds, time and again throughout your history, to persevere, to rise up, and to emerge stronger.
The historian Paul Johnson, writing on the 50th anniversary of the creation of the Jewish state, said that over the course of Israel’s life, 100 completely new independent states had come into existence. “Israel is the only one whose creation can fairly be called a miracle,” Johnson wrote.
It is a deeply moving experience to be in Jerusalem, the capital of Israel.
Our two nations are separated by more than 5,000 miles. But for an American abroad, you can’t get much closer to the ideals and convictions of my own country than you do in Israel. We’re part of the great fellowship of democracies. We speak the same language of freedom and justice, and the right of every person to live in peace. We serve the same cause and provoke the same hatreds in the same enemies of civilization.
It is my firm conviction that the security of Israel is in the vital national security interest of the United States. And ours is an alliance based not only on shared interests but also on enduring shared values.
In those shared values, one of the strongest voices is that of your prime minister, my friend Benjamin Netanyahu. I met with him earlier this morning and I look forward to my family joining his this evening as they observe the close of this fast day of Tisha B’Av.
It’s remarkable to consider how much adversity, over so great a span of time, is recalled by just one day on the calendar. This is a day of remembrance and mourning, but like other such occasions, it also calls forth clarity and resolve.
At this time, we also remember the 11 Israeli athletes and coaches who were massacred at the Munich Olympics forty years ago. Ten years ago this week, 9 Israeli and American students were murdered in the terrorist attack at Hebrew University. And tragedies like these are not reserved to the past. They are a constant reminder of the reality of hate, and the will with which it is executed upon the innocent.
It was Menachem Begin who said this about the Ninth of the month of Av: “We remember that day,” he said, “and now have the responsibility to make sure that never again will our independence be destroyed and never again will the Jew become homeless or defenseless.” “This,” Prime Minister Begin added, “is the crux of the problems facing us in the future.”
So it is today, as Israel faces enemies who deny past crimes against the Jewish people and seek to commit new ones.
When Iran’s leaders deny the Holocaust or speak of wiping this nation off the map, only the naïve – or worse – will dismiss it as an excess of rhetoric. Make no mistake: the ayatollahs in Tehran are testing our moral defenses. They want to know who will object, and who will look the other way.
My message to the people of Israel and the leaders of Iran is one and the same: I will not look away; and neither will my country. As Prime Minister Begin put it, in vivid and haunting words, “if an enemy of [the Jewish] people says he seeks to destroy us, believe him.”
We have seen the horrors of history. We will not stand by. We will not watch them play out again.
It would be foolish not to take Iran’s leaders at their word. They are, after all, the product of a radical theocracy.
Over the years Iran has amassed a bloody and brutal record. It has seized embassies, targeted diplomats, and killed its own people. It supports the ruthless Assad regime in Syria. They have provided weapons that have killed American soldiers in Afghanistan and Iraq. It has plotted to assassinate diplomats on American soil. It is Iran that is the leading state sponsor of terrorism and the most destabilizing nation in the world.
We have a solemn duty and a moral imperative to deny Iran’s leaders the means to follow through on their malevolent intentions.
We should stand with all who would join our effort to prevent a nuclear-armed Iran – and that includes Iranian dissidents. Do not erase from your memory the scenes from three years ago, when that regime brought death to its own people as they rose up. The threat we face does not come from the Iranian people, but from the regime that oppresses them.
Five years ago, at the Herzliya Conference, I stated my view that Iran’s pursuit of nuclear weapons capability presents an intolerable threat to Israel, to America, and to the world.
That threat has only become worse.
Now as then, the regime’s claims that it seeks to enrich nuclear material for peaceful purposes are belied by years of malign deceptions.
Now as then, the conduct of Iran’s leaders gives us no reason to trust them with nuclear material.
But today, the regime in Iran is five years closer to developing nuclear weapons capability. Preventing that outcome must be our highest national security priority.
I want to pause on this last point. It is sometimes said that those who are the most committed to stopping the Iranian regime from securing nuclear weapons are reckless and provocative and inviting war.
The opposite is true. We are the true peacemakers. History teaches with force and clarity that when the world’s most despotic regimes secure the world’s most destructive weapons, peace often gives way to oppression, to violence, or to devastating war.
We must not delude ourselves into thinking that containment is an option. We must lead the effort to prevent Iran from building and possessing nuclear weapons capability. We should employ any and all measures to dissuade the Iranian regime from its nuclear course, and it is our fervent hope that diplomatic and economic measures will do so. In the final analysis, of course, no option should be excluded. We recognize Israel’s right to defend itself, and that it is right for America to stand with you.
These are some of the principles I first outlined five years ago. What was timely then has become urgent today.
Let me turn from Iran to other nations in the Middle East, where we have seen rising tumult and chaos. To the north, Syria is on the brink of a civil war. The dictator in Damascus, no friend to Israel and no friend to America, slaughters his own people as he desperately clings to power.
Your other neighbor to the north, Lebanon, is under the growing and dangerous influence of Hezbollah.
After a year of upheaval and unrest, Egypt now has an Islamist President, chosen in a democratic election. Hopefully, this new government understands that one true measure of democracy is how those elected by the majority respect the rights of those in the minority. The international community must use its considerable influence to ensure that the new government honors the peace agreement with Israel that was signed by the government of Anwar Sadat.
As you know only too well, since Hamas took control of the Gaza Strip in 2007, thousands of rockets have rained on Israeli homes and cities. I have walked on the streets of Sderot, and honor the resolve of its people. And now, new attacks have been launched from the Sinai Peninsula.
With Hezbollah rockets aimed at Israel from the north, and Hamas rockets aimed from the south, with much of the Middle East in tumult, and with Iran bent on nuclear arms, America’s vocal and demonstrated commitment to the defense of Israel is even more critical. Whenever the security of Israel is most in doubt, America’s commitment to Israel must be most secure.
When the decision was before him in 1948, President Harry Truman decided without hesitation that the United States would be the first country to recognize the State of Israel. From that moment to this, we have been the most natural of allies, but our alliance runs deeper than the designs of strategy or the weighing of interests.
The story of how America – a nation still so new to the world by the standards of this ancient region – rose up to become the dear friend of the people of Israel is among the finest and most hopeful in our nation’s history.
Different as our paths have been, we see the same qualities in one another. Israel and America are in many respects reflections of one another.
We both believe in democracy, in the right of every people to select their leaders and choose their nation’s course.
We both believe in the rule of law, knowing that in its absence, willful men may incline to oppress the weak.
We both believe that our rights are universal, granted not by government but by our Creator.
We both believe in free enterprise, because it is the only economic system that has lifted people from poverty, created a large and enduring middle class, and inaugurated incomparable achievements and human flourishing.
As someone who has spent most of his life in business, I am particularly impressed with Israel’s cutting edge technologies and thriving economy. We recognize yours as the “start-up nation” – and the evidence is all around us.
You have embraced economic liberty. You export technology, not tyranny or terrorism. And today, your innovators and entrepreneurs have made the desert bloom and have made for a better world. The citizens of our countries are fortunate to share in the rewards of economic freedom and in the creativity of our entrepreneurs. What you have built here, with your own hands, is a tribute to your people, and a model for others.
Finally, we both believe in freedom of expression, because we are confident in our ideas and in the ability of men and women to think for themselves. We do not fear open debate. If you want to hear some very sharp criticisms of Israel and its policies, you don’t have to cross any borders. All you have to do is walk down the street and into a café, where you’ll hear people reasoning, arguing, and speaking their mind. Or pick up an Israeli newspaper – you’ll find some of the toughest criticism of Israel you’ll read anywhere. Your nation, like ours, is stronger for this energetic exchange of ideas and opinions.
That is the way it is in a free society. There are many millions of people in the Middle East who would cherish the opportunity to do the same. These decent men and women desire nothing more than to live in peace and freedom and to have the opportunity to not only choose their government but to criticize it openly, without fear of repression or repercussion.
I believe that those who oppose these fundamental rights are on the wrong side of history. But history’s march can be ponderous and painfully slow. We have a duty to speed and shape history by being unapologetic ambassadors for the values we share.
The United States and Israel have shown that we can build strong economies and strong militaries. But we must also build strong arguments that advance our values and promote peace. We must work together to change hearts and awaken minds through the power of freedom, free enterprise and human rights.
I believe that the enduring alliance between the State of Israel and the United States of America is more than a strategic alliance: it is a force for good in the world. America’s support of Israel should make every American proud. We should not allow the inevitable complexities of modern geopolitics to obscure fundamental touchstones. No country or organization or individual should ever doubt this basic truth: A free and strong America will always stand with a free and strong Israel.
And standing by Israel does not mean with military and intelligence cooperation alone.
We cannot stand silent as those who seek to undermine Israel, voice their criticisms. And we certainly should not join in that criticism. Diplomatic distance in public between our nations emboldens Israel’s adversaries.
By history and by conviction, our two countries are bound together. No individual, no nation, no world organization, will pry us apart. And as long as we stay together and stand together, there is no threat we cannot overcome and very little that we cannot achieve.
Thank you all. May God bless America, and may He bless and protect the Nation of Israel.
4,889 views
[[2]]
<<PlainTextDocument (metadata: 7)>>
08/14/12 – Mitt Romney’s Speech in Chillicothe, Ohio
Tweet
Thank you, Ohio. It’s good to be back in the Buckeye State. And it’s a privilege to be here with two good friends – your great governor, John Kasich and your outstanding senator, Rob Portman. Governor Kasich is doing a great job despite the head winds from Washington. As President, I can’t wait to work with Senator Portman to turn those Obama headwinds into pro-job policies that will help working families all across Ohio.
Tonight, we’re wrapping up our five-state bus tour to towns big and small. That trip reconfirmed to me just how important this election is – and why we need to change the direction of the country by changing the current occupant of the Oval Office.
We started out on the decks of a battleship in Norfolk, Virginia, where arbitrary and reckless defense cuts threaten our national security and 150,000 jobs. From there it was on to North Carolina, through towns that have lost thousands and thousands of manufacturing jobs. And yesterday we were in Florida, where families are still struggling with the Obama Economy.
The people I met on this tour – and the thousands of Americans I’ve visited in break rooms and lunch rooms, in school gymnasiums and on factory floors – are worried about their children, their jobs, their mortgages, and their future. And they are right to be worried.
All across the country, I’ve met people who are hurting. Some have lost their jobs; others work two jobs just to get by. Some have fallen out of the middle class and now they’re struggling to get back to where they started. The cost of living keeps going up, and they’re living paycheck to paycheck.
They are tired of being tired.
And tonight, I’d like to say to each of them: You have not been forgotten. We will not leave you behind. This is America. We are Americans. It doesn’t have to be this way!
Unemployment has been above 8 percent for 42 straight months. We will put Americans back to work!
Half of recent college graduates can’t find work or a job that matches their skills. We’ll get good jobs for our kids.
Nearly one out of six Americans are in poverty today. This is a disgrace we will end.
And President Obama has amassed five trillion dollars of debt – nearly as much debt held by the public as all other Presidents combined. We will end this moral failure.
After four years, it’s clear that President Obama’s policies aren’t fixing these problems, they’re making them worse. That is why Ohio will lead the way by electing a new President on November 6th.
For the first time, most Americans believe that our best days are behind us. This is an election in which we should be talking about the path ahead, but you don’t hear any answers coming from President Obama’s re-election campaign. That’s because he’s intellectually exhausted, out of ideas, and out of energy. And so his campaign has resorted to diversions and distractions, to demagoguing and defaming others. This is an old game in politics; what’s different this year is that the president is taking things to a new low.
It wasn’t supposed to be this way.
In 2008, Candidate Obama said, “if you don’t have any fresh ideas, then you use stale tactics to scare voters.” He said, “if you don’t have a record to run on, then you paint your opponent as someone people should run from.” And that, he told us, is how, “You make a big election about small things.”
That was Candidate Obama describing the strategy that is the now the heart of his campaign.
His campaign and his surrogates have made wild and reckless accusations that disgrace the office of the Presidency. Another outrageous charge came a few hours ago in Virginia. And the White House sinks a little bit lower.
This is what an angry and desperate Presidency looks like.
President Obama knows better, promised better and America deserves better.
Over the last four years, this President has pushed Republicans and Democrats as far apart as they can go. And now he and his allies are pushing us all even further apart by dividing us into groups. He demonizes some. He panders to others. His campaign strategy is to smash America apart and then cobble together 51 percent of the pieces.
If an American president wins that way, we all lose.
But he won’t win that way. America is one Nation under God. American history has been a story of the many becoming one – uniting to preserve liberty, uniting to build the greatest economy in the world, uniting to save the world from unspeakable darkness. Everywhere I go in America there are monuments that list those who have given their lives. There is no mention of their race, their party affiliation or what they did for a living. They lived and died under a single flag fighting for a single purpose. They pledged allegiance to the United States of America. So, Mr. President, take your campaign of division and anger and hate back to Chicago and let us get about rebuilding and reuniting America.
This election is about restoring the promise of America. It’s a choice between two visions for our nation’s future. It’s about the challenges America faces. It is about a better tomorrow and a better future.
We don’t need more excuses. We don’t need more blame. We don’t need more small-minded attacks.
What we really need is a new president.
Voters deserve an honest debate. And that’s what Paul Ryan and I will give them.
Paul and I have a positive agenda that will lead to economic growth, to widespread and shared prosperity that will improve the lives of our fellow citizens. Our Plan For A Stronger Middle Class will get America back to work and get our country back on track.
We are offering solutions that are bold, specific, and achievable. We’re committed to helping create 12 million new jobs and to bring better take-home pay to middle class families.
My plan focuses on five things.
First, energy independence. We will achieve North America energy independence by 2020, by taking full advantage of our oil, our gas, our coal, our renewables and our nuclear power. Abundant, inexpensive, domestic energy will not only create energy jobs, it will bring back manufacturing jobs.
Second, we must give our workers and our children the skills they need to succeed. Our nation cannot continue to fail in public education. For too long, we have let the agenda of union bosses steer the agenda of our schools. It is time to put our kids and their parents and their teachers first, and the union bosses behind.
Third, trade must work for America. We are one of the world’s most productive nations. Trade creates jobs and raises take-home pay for American workers. We must open more doors for trade in Latin America, where there is a growing middle class. But when any nation cheats, as China has cheated, we must make sure that there are clear and compelling consequences.
Fourth, we will do what politicians in both parties have been promising for years, but have failed to do. We will cut spending, shrink deficits, and put America on track to a balanced budget.
Fifth, we will champion small business. Unlike President Obama, I won’t raise taxes on small business. I’ll make sure regulators protect the public, but that they stop killing our jobs. I will remove the crippling uncertainty that is preventing businesses from hiring.
That begins by repealing Obamacare. It’s bad for jobs and it’s bad for seniors. If the President is re-elected, he will succeed in raiding $716 billion from Medicare — from the trust fund you have paid into all your lives – to pay for Obamacare. He is taking your money to finance his risky and unproven takeover of the health-care system. He is putting Medicare at greater risk. He is putting health care at greater risk. He is putting your jobs at greater risk. We must not let Obamacare happen.
If we focus on these five areas – energy, education, trade, deficits, and championing small business – America’s economy will come roaring back to life. And we will finally see a comeback for America’s middle class.
My plan is based on proven principles that will produce real results. I spent 25 years in business, and I know what it takes for the private sector to create jobs. I know why jobs go away, what it takes to bring them back, and what we must do to make America the best place in the world for entrepreneurs and innovators and job creators. My five-point plan will bring more jobs and more take-home pay for middle-class Americans.
People ask me why I think the President’s policies have been such a disappointment. I just don’t think President Obama understands what it is that drives our economy.
America runs on freedom. Free men and women, pursuing their dreams, working hard to build a better future for their families. This is what propels our economy. When an American succeeds, when she wins a promotion, when he creates a business, it is that individual, that American that has earned it, that has built it. Government does not build our businesses, the American people do.
The American people also build the government. We pay for it with our taxes. We choose who will lead us with our votes.
Do you want a president who believes that your rights come from God, not from government?
Do you want a president who honors your right to pursue happiness, not as government commands, but as you choose?
Do you want a president who will work every day to bring us together, not tear us apart?
Do you want a president who will celebrate success, not attack it?
Do you want a president who will never, ever apologize for the greatest nation on earth?
With your support, I will be that President.
We are 84 days away from the start of the better future we deserve.
We need new leadership, and new ideas, and a new approach – because four years of failure is enough.
Paul Ryan and I believe in America – and in this election, we’re offering Americans a clear and honest choice. Every single day we’re going to do our part. And we need you to do yours.
I commit to you that I will be the President that this moment demands. I will work to strengthen our families, to rebuild our economy and to keep our military second to none in the world.
I ask you to commit like never before over the next 84 days. This election can come down to just one more vote. I ask you find that vote. Ask one more person to join our campaign. Ask one more person to join us who supported President Obama four years ago and didn’t get the change they deserved. One more vote can make the difference in Ohio. And Ohio will make the difference for America.
Thank you. God bless you. And God bless the United States of America.
7,573 views

Related

How to remove from a string questions asked with a clear pattern in R?

Let's assume I have a text like the following one:
x = "\n\n\n\n\n\nTranscript of the questions asked and the answers given by Dr. Willem F. Duisenberg, President of the ECB and Christian Noyer, Vice-President of the ECB\n\n\n\nQuestion: Dr. Duisenberg, on structural reform, when you talk to economists about the euro's exchange rate weakness with the dollar, some of them don't point to anything to do with the currency per se but talk about the lack of structural reform, particularly in labour markets and particularly in Germany, for a factor which keeps the exchange rate down long term. What is your opinion on the matter and your opinion on the state of structural reforms, the amount of progress, or the lack thereof?\nDuisenberg. There has been some progress with structural reform. It is certainly not the case that nothing has been done in the past couple of years, but it is certainly not enough. And it has to be continued with force, we hope, and that is also everything that the governments are working towards, especially the Spanish presidency, ahead of the European summit in Barcelona this year. As far as the causes are concerned, the analysis you just gave was recently also given by Mr. Greenspan, who also ascribed the lack of movement in the exchange rate to the far lower degree of flexibility in the economy of Europe as compared with the United States and, as usual, I happen to agree with him.\nQuestion: Mr. President, you have said many times, and also very recently, that you are expecting an appreciation of the euro. Would you say that the changeover, or yesterday, is a turning-point for the currency?\nDuisenberg. I will not speculate further. I am here to fight speculation rather than to add to it. But certainly the movement of the past couple of days was, well, to say the least, gratifying to see. \nQuestion: Mr. Duisenberg, you have told us several times already that whenever there was an intervention by the ECB in the currency market, you would tell us. So, could you tell us something today on this issue?\nDuisenberg. I have also learnt never to talk again about intervention until after the event. So I won't do that today either.\nQuestion: A question to you, Mr. President, and to the Vice-President also if he maybe has something to add to the question. Do you expect a wider use of the euro as a reserve currency of central banks outside the euro zone as a denomination for bonds, especially corporate ones, or do you think it is possible that all will be paid in euro instead of dollars one day and, if so, when?\nDuisenberg. The last parts of the question will undoubtedly be answered by Mr. Noyer. The use of the euro as an international reserve currency is increasing, but very slowly. And it was expected to be very slow, but increasingly we are getting signals that countries, especially central banks of countries, are beginning to realise the possibilities they now have to diversify their reserve holdings. But it is not something we are aiming for, we will just let it happen. But it is happening, and the fact that, for example, in the recent experiences of the cash changeover, we have frontloaded to more than 20 non-euro area central banks sizeable sums, billions and billions worth of euro banknotes, is already an indication of this. The fact also that in the eastern hemisphere, where we are, more than 50 countries, in one way or the other, link their currency or align their currency to the euro is also a telling aspect of the phenomenon. But I don't want to ask Mr. Noyer to speculate about the \"when\", precisely if I assume he knows as much as I do."
As you can see, questions are asked with a clear pattern: \nQuestion: .....?\n. I would like to remove every question asked from the text. I have been playing with gsub but not very successfully so far. The outcome would be:
x = "\n\n\n\n\n\nTranscript of the questions asked and the answers given by Dr. Willem F. Duisenberg, President of the ECB and Christian Noyer, Vice-President of the ECB\n\n\nDuisenberg. There has been some progress with structural reform. It is certainly not the case that nothing has been done in the past couple of years, but it is certainly not enough. And it has to be continued with force, we hope, and that is also everything that the governments are working towards, especially the Spanish presidency, ahead of the European summit in Barcelona this year. As far as the causes are concerned, the analysis you just gave was recently also given by Mr. Greenspan, who also ascribed the lack of movement in the exchange rate to the far lower degree of flexibility in the economy of Europe as compared with the United States and, as usual, I happen to agree with him.Duisenberg. I will not speculate further. I am here to fight speculation rather than to add to it. But certainly the movement of the past couple of days was, well, to say the least, gratifying to see. Duisenberg. I have also learnt never to talk again about intervention until after the event. So I won't do that today either.Duisenberg. The last parts of the question will undoubtedly be answered by Mr. Noyer. The use of the euro as an international reserve currency is increasing, but very slowly. And it was expected to be very slow, but increasingly we are getting signals that countries, especially central banks of countries, are beginning to realise the possibilities they now have to diversify their reserve holdings. But it is not something we are aiming for, we will just let it happen. But it is happening, and the fact that, for example, in the recent experiences of the cash changeover, we have frontloaded to more than 20 non-euro area central banks sizeable sums, billions and billions worth of euro banknotes, is already an indication of this. The fact also that in the eastern hemisphere, where we are, more than 50 countries, in one way or the other, link their currency or align their currency to the euro is also a telling aspect of the phenomenon. But I don't want to ask Mr. Noyer to speculate about the \"when\", precisely if I assume he knows as much as I do."
Can anyone help me with this?
Thanks!
You can do
gsub('\nQuestion:.*?\\?', '', x)
resulting in
cat(gsub('\nQuestion:.*?\\?', '', x))
Transcript of the questions asked and the answers given by Dr. Willem F. Duisenberg, President of the ECB and Christian Noyer, Vice-President of the ECB
Duisenberg. There has been some progress with structural reform. It is certainly not the case that nothing has been done in the past couple of years, but it is certainly not enough. And it has to be continued with force, we hope, and that is also everything that the governments are working towards, especially the Spanish presidency, ahead of the European summit in Barcelona this year. As far as the causes are concerned, the analysis you just gave was recently also given by Mr. Greenspan, who also ascribed the lack of movement in the exchange rate to the far lower degree of flexibility in the economy of Europe as compared with the United States and, as usual, I happen to agree with him.
Duisenberg. I will not speculate further. I am here to fight speculation rather than to add to it. But certainly the movement of the past couple of days was, well, to say the least, gratifying to see.
Duisenberg. I have also learnt never to talk again about intervention until after the event. So I won't do that today either.
Duisenberg. The last parts of the question will undoubtedly be answered by Mr. Noyer. The use of the euro as an international reserve currency is increasing, but very slowly. And it was expected to be very slow, but increasingly we are getting signals that countries, especially central banks of countries, are beginning to realise the possibilities they now have to diversify their reserve holdings. But it is not something we are aiming for, we will just let it happen. But it is happening, and the fact that, for example, in the recent experiences of the cash changeover, we have frontloaded to more than 20 non-euro area central banks sizeable sums, billions and billions worth of euro banknotes, is already an indication of this. The fact also that in the eastern hemisphere, where we are, more than 50 countries, in one way or the other, link their currency or align their currency to the euro is also a telling aspect of the phenomenon. But I don't want to ask Mr. Noyer to speculate about the "when", precisely if I assume he knows as much as I do
Another option using rm_between from qdapRegex:
x = "\n\n\n\n\n\nTranscript of the questions asked and the answers given by Dr. Willem F. Duisenberg, President of the ECB and Christian Noyer, Vice-President of the ECB\n\n\n\nQuestion: Dr. Duisenberg, on structural reform, when you talk to economists about the euro's exchange rate weakness with the dollar, some of them don't point to anything to do with the currency per se but talk about the lack of structural reform, particularly in labour markets and particularly in Germany, for a factor which keeps the exchange rate down long term. What is your opinion on the matter and your opinion on the state of structural reforms, the amount of progress, or the lack thereof?\nDuisenberg. There has been some progress with structural reform. It is certainly not the case that nothing has been done in the past couple of years, but it is certainly not enough. And it has to be continued with force, we hope, and that is also everything that the governments are working towards, especially the Spanish presidency, ahead of the European summit in Barcelona this year. As far as the causes are concerned, the analysis you just gave was recently also given by Mr. Greenspan, who also ascribed the lack of movement in the exchange rate to the far lower degree of flexibility in the economy of Europe as compared with the United States and, as usual, I happen to agree with him.\nQuestion: Mr. President, you have said many times, and also very recently, that you are expecting an appreciation of the euro. Would you say that the changeover, or yesterday, is a turning-point for the currency?\nDuisenberg. I will not speculate further. I am here to fight speculation rather than to add to it. But certainly the movement of the past couple of days was, well, to say the least, gratifying to see. \nQuestion: Mr. Duisenberg, you have told us several times already that whenever there was an intervention by the ECB in the currency market, you would tell us. So, could you tell us something today on this issue?\nDuisenberg. I have also learnt never to talk again about intervention until after the event. So I won't do that today either.\nQuestion: A question to you, Mr. President, and to the Vice-President also if he maybe has something to add to the question. Do you expect a wider use of the euro as a reserve currency of central banks outside the euro zone as a denomination for bonds, especially corporate ones, or do you think it is possible that all will be paid in euro instead of dollars one day and, if so, when?\nDuisenberg. The last parts of the question will undoubtedly be answered by Mr. Noyer. The use of the euro as an international reserve currency is increasing, but very slowly. And it was expected to be very slow, but increasingly we are getting signals that countries, especially central banks of countries, are beginning to realise the possibilities they now have to diversify their reserve holdings. But it is not something we are aiming for, we will just let it happen. But it is happening, and the fact that, for example, in the recent experiences of the cash changeover, we have frontloaded to more than 20 non-euro area central banks sizeable sums, billions and billions worth of euro banknotes, is already an indication of this. The fact also that in the eastern hemisphere, where we are, more than 50 countries, in one way or the other, link their currency or align their currency to the euro is also a telling aspect of the phenomenon. But I don't want to ask Mr. Noyer to speculate about the \"when\", precisely if I assume he knows as much as I do."
x
#> [1] "\n\n\n\n\n\nTranscript of the questions asked and the answers given by Dr. Willem F. Duisenberg, President of the ECB and Christian Noyer, Vice-President of the ECB\n\n\n\nQuestion: Dr. Duisenberg, on structural reform, when you talk to economists about the euro's exchange rate weakness with the dollar, some of them don't point to anything to do with the currency per se but talk about the lack of structural reform, particularly in labour markets and particularly in Germany, for a factor which keeps the exchange rate down long term. What is your opinion on the matter and your opinion on the state of structural reforms, the amount of progress, or the lack thereof?\nDuisenberg. There has been some progress with structural reform. It is certainly not the case that nothing has been done in the past couple of years, but it is certainly not enough. And it has to be continued with force, we hope, and that is also everything that the governments are working towards, especially the Spanish presidency, ahead of the European summit in Barcelona this year. As far as the causes are concerned, the analysis you just gave was recently also given by Mr. Greenspan, who also ascribed the lack of movement in the exchange rate to the far lower degree of flexibility in the economy of Europe as compared with the United States and, as usual, I happen to agree with him.\nQuestion: Mr. President, you have said many times, and also very recently, that you are expecting an appreciation of the euro. Would you say that the changeover, or yesterday, is a turning-point for the currency?\nDuisenberg. I will not speculate further. I am here to fight speculation rather than to add to it. But certainly the movement of the past couple of days was, well, to say the least, gratifying to see. \nQuestion: Mr. Duisenberg, you have told us several times already that whenever there was an intervention by the ECB in the currency market, you would tell us. So, could you tell us something today on this issue?\nDuisenberg. I have also learnt never to talk again about intervention until after the event. So I won't do that today either.\nQuestion: A question to you, Mr. President, and to the Vice-President also if he maybe has something to add to the question. Do you expect a wider use of the euro as a reserve currency of central banks outside the euro zone as a denomination for bonds, especially corporate ones, or do you think it is possible that all will be paid in euro instead of dollars one day and, if so, when?\nDuisenberg. The last parts of the question will undoubtedly be answered by Mr. Noyer. The use of the euro as an international reserve currency is increasing, but very slowly. And it was expected to be very slow, but increasingly we are getting signals that countries, especially central banks of countries, are beginning to realise the possibilities they now have to diversify their reserve holdings. But it is not something we are aiming for, we will just let it happen. But it is happening, and the fact that, for example, in the recent experiences of the cash changeover, we have frontloaded to more than 20 non-euro area central banks sizeable sums, billions and billions worth of euro banknotes, is already an indication of this. The fact also that in the eastern hemisphere, where we are, more than 50 countries, in one way or the other, link their currency or align their currency to the euro is also a telling aspect of the phenomenon. But I don't want to ask Mr. Noyer to speculate about the \"when\", precisely if I assume he knows as much as I do."
library(qdapRegex)
rm_between(x, "\nQuestion:", "?\n", extract = F)
#> [1] "Transcript of the questions asked and the answers given by Dr. Willem F. Duisenberg, President of the ECB and Christian Noyer, Vice-President of the ECB Duisenberg. There has been some progress with structural reform. It is certainly not the case that nothing has been done in the past couple of years, but it is certainly not enough. And it has to be continued with force, we hope, and that is also everything that the governments are working towards, especially the Spanish presidency, ahead of the European summit in Barcelona this year. As far as the causes are concerned, the analysis you just gave was recently also given by Mr. Greenspan, who also ascribed the lack of movement in the exchange rate to the far lower degree of flexibility in the economy of Europe as compared with the United States and, as usual, I happen to agree with him. Duisenberg. I will not speculate further. I am here to fight speculation rather than to add to it. But certainly the movement of the past couple of days was, well, to say the least, gratifying to see. Duisenberg. I have also learnt never to talk again about intervention until after the event. So I won't do that today either. Duisenberg. The last parts of the question will undoubtedly be answered by Mr. Noyer. The use of the euro as an international reserve currency is increasing, but very slowly. And it was expected to be very slow, but increasingly we are getting signals that countries, especially central banks of countries, are beginning to realise the possibilities they now have to diversify their reserve holdings. But it is not something we are aiming for, we will just let it happen. But it is happening, and the fact that, for example, in the recent experiences of the cash changeover, we have frontloaded to more than 20 non-euro area central banks sizeable sums, billions and billions worth of euro banknotes, is already an indication of this. The fact also that in the eastern hemisphere, where we are, more than 50 countries, in one way or the other, link their currency or align their currency to the euro is also a telling aspect of the phenomenon. But I don't want to ask Mr. Noyer to speculate about the \"when\", precisely if I assume he knows as much as I do."
Created on 2022-08-26 with reprex v2.0.2

Filtering dataframe based on a string in R

I have a data frame similar to this
dput(sample_data)
structure(list(listing_id = c(12899L, 12899L, 12899L, 12899L,
12899L, 12899L, 12899L, 12899L, 12899L, 12899L, 12899L, 12899L,
12899L, 12899L, 12899L, 12899L, 12899L, 12899L, 12899L, 12899L,
12899L, 12899L, 12899L, 12899L, 12899L, 12899L, 12899L, 12899L,
12899L, 12899L, 12899L, 12899L, 12899L, 12899L, 12899L, 12899L,
12899L, 12899L, 12899L, 12899L, 12899L, 12899L, 12899L, 12899L,
12899L, 12899L, 12899L, 12899L, 12899L, 12899L, 12899L, 12899L,
12899L, 12899L, 12899L, 12899L, 12899L, 12899L, 12899L, 12899L,
12899L, 12899L, 12899L, 12899L, 12899L, 12899L, 12899L, 12899L,
12899L, 12899L, 12899L, 12899L, 12899L, 12899L, 12899L, 12899L,
12899L, 12899L, 12899L, 12899L), id = c(24767, 29230, 29806,
32572, 32862, 40792, 43566, 43920, 46120, 48434, 52902, 57458,
61672, 68414, 71418, 74541, 75259, 77605, 78600, 79300, 80982,
82555, 83752, 98488, 99753, 102145, 105460, 107350, 111060, 118238,
122914, 130226, 150419, 176176, 179317, 183355, 188840, 200734,
213728, 216268, 219476, 224141, 230224, 242707, 256155, 271224,
274658, 299623, 305993, 326731, 348879, 358361, 365440, 405902,
416997, 421410, 431327, 439108, 450967, 462680, 475923, 497264,
504158, 512703, 569301, 592555, 611971, 621267, 634440, 636623,
666385, 721778, 735454, 744152, 777928, 786787, 811911, 821548,
833250, 848303), date = c("24/01/2010", "13/03/2010", "16/03/2010",
"31/03/2010", "02/04/2010", "08/05/2010", "17/05/2010", "18/05/2010",
"24/05/2010", "31/05/2010", "14/06/2010", "26/06/2010", "06/07/2010",
"24/07/2010", "31/07/2010", "06/08/2010", "07/08/2010", "12/08/2010",
"15/08/2010", "16/08/2010", "18/08/2010", "22/08/2010", "24/08/2010",
"16/09/2010", "18/09/2010", "21/09/2010", "26/09/2010", "28/09/2010",
"04/10/2010", "13/10/2010", "19/10/2010", "31/10/2010", "07/12/2010",
"30/01/2011", "07/02/2011", "16/02/2011", "26/02/2011", "16/03/2011",
"31/03/2011", "03/04/2011", "06/04/2011", "12/04/2011", "18/04/2011",
"27/04/2011", "09/05/2011", "19/05/2011", "22/05/2011", "06/06/2011",
"09/06/2011", "21/06/2011", "02/07/2011", "07/07/2011", "11/07/2011",
"30/07/2011", "03/08/2011", "05/08/2011", "09/08/2011", "12/08/2011",
"16/08/2011", "21/08/2011", "26/08/2011", "03/09/2011", "05/09/2011",
"08/09/2011", "26/09/2011", "03/10/2011", "09/10/2011", "11/10/2011",
"16/10/2011", "17/10/2011", "26/10/2011", "15/11/2011", "21/11/2011",
"26/11/2011", "11/12/2011", "15/12/2011", "29/12/2011", "01/01/2012",
"03/01/2012", "07/01/2012"), reviewer_id = c(69327L, 72846L,
84196L, 89114L, 100318L, 106706L, 122590L, 124878L, 115296L,
128686L, 101332L, 133253L, 61601L, 170065L, 89041L, 174803L,
189922L, 53967L, 97181L, 165949L, 169685L, 166756L, 24799L, 1972408L,
214136L, 212710L, 216604L, 49785L, 205468L, 207387L, 232310L,
202219L, 290589L, 339123L, 128686L, 112038L, 385948L, 409204L,
406780L, 382114L, 153837L, 117790L, 430323L, 501446L, 102379L,
574784L, 476509L, 493172L, 656282L, 614047L, 755566L, 555937L,
193404L, 12386L, 650075L, 794170L, 348567L, 820789L, 888114L,
817107L, 546440L, 791723L, 989632L, 588916L, 1013150L, 888114L,
1128969L, 450362L, 166365L, 894104L, 1206085L, 1296041L, 1390344L,
1215456L, 1421703L, 970946L, 26035L, 1540509L, 1502615L, 1486972L
), reviewer_name = c("Stuart", "John", "Lois", "Troy", "Cathy",
"Johanna", "Madelyn", "Adam", "Craig", "Leah", "Christopher",
"John & Lyn", "Nick", "Hope & Sebastien", "Ariel", "Marilyn",
"Kathy", "Erik", "Angela", "Erica", "Susan", "Darrell", "Mavis",
"Jaclyn", "Jen", "Frederick", "Linda", "Barrett", "Lynda", "Sarah",
"Maneesh", "Constance", "Chris", "Toby", "Leah", "Vincent", "Ellen",
"Fran", "Mark", "Ryan", "James", "Sally", "Annette", "Lynne",
"Angela", "Katie And Tommy", "Leigh", "Liz", "David", "Diana",
"Iñaki", "Mary", "Wendy", "Adrian", "Joan", "Kristine", "Jovana",
"Beth", "Deevy", "Craig", "Jennifer", "Barbara", "Biff", "Kelly",
"Amanda", "Deevy", "Pieter & Dietsje", "Johnny", "Sherri", "Suzette",
"Nancy", "Duncan", "Rebecca", "Pam", "Kaitlin", "Paul & Iho & Alexandrea & Anabella",
"Norma", "Kim", "Ana", "Daron"), comments = c("recommended very good value spacious airy upper floor alison david welcoming helpful",
"our ten days visiting portland enormously enhanced alison david they contributed welcoming warmth wonderful economical accomodations if lucky enough get back portland maine imagine staying anywhere else br jack lorel",
"we wonderful time staying area alberta arts the beds comfy upstairs spacious with walk 5 blocks found great food including thai one try chicken satay ali david amazing home filled great atmosphere lots laughs definitely place revisit",
"i stayed ali david s place i first moved portland the space comfortable private lots room ali david knowledgeable portland neighborhoods get around anyone coming portland will enjoy stay here",
"clean comfortable quiet rooms easygoing generous hosts great walking neighborhood close parks seemingly unlimited restaurant choices wish able stay longer",
"beautiful neighborhood convenient airport interstate considerate hosts comfortable spacious private rooms i asked better highly recommend anyone traveling portland",
"this space ideal 3 adults my wife sister i spent weekend portland stayed here we found space clean hosts friendly neighborhood quiet we never part portland happened come local street fair ended finding good vegetarian fare just blocks away enjoyed walking street we will definitely consider space option visiting portland",
"beautiful house cute neighborhood the hosts gracious helpful without over bearing two bedrooms small kitchen space coffee maker small bathroom shower provided enough space highly recommended anyone looking something personal hotel room better price too",
"wonderful gracious welcoming hosts when i asked david child barrier stairs quickly came solution they provide place way home hotel gave us insight portland help us move i recommend place highly very clean quiet neighborhood thanks ali david",
"i recommend place enough the rooms bright pretty even gray day hosts just terrific knowledgeable friendly generous when i found i d forgotten running shoes ali lent me hers i m indebted life especially since i indulging wonderful food prepared many marvelous restaurants found mere blocks away should prefer something simpler new seasons within easy walking distance plus two massage studios two yoga studios just close who ask more",
"allison david stellar hosts combining available attentiveness needs quiet leisurely atmosphere home space comfortable spotless alli s garden inspiring perfect holiday",
"had great time dave ali they friendly helpful nothing much trouble the room private comfortable bathroom sole use plenty eating places nearby try hamburgers new seasons highly recommended",
"fantastic spot comfy clean quiet prime location even got nice bike ride in a ideal place spend days portland",
"unfortunately able chat much ali david busy seem lovely br br the suite wonderful place stay hubbub really tourist y areas there great restaurants nearby though walking around area cinch make sure look bus routes if car get here house obvious frequent route although knew busses best easy br br ali david good resource great place stay",
"we asked much hosts ali david welcoming room clean bed soooo comfy our time portland definitely enhanced staying here couldn t recommend more",
"this perfect space charming convenient neighborhood hosts helpful intrusive a great find",
"very clean quiet friendly hosts we enjoyed two night stay much recommend highly great places eat alberta area",
"great hosts classic quiet portland home the converted attic almost apartment great access northeast portland scene",
"ali dave warm gracious hosts we arrived late flight willing wait us the place lovely clean conveniently located we definitely recommend staying here",
"i wonderful introduction portland staying clean comfy spacious appartment ali dave s charming home i overnighted moved quickly i get spend much time ali dave however charming helpful throughout stay the room ideally located get airport short taxi ride the location great artsy laid back spot cool places eat coffee generally absorb atmosphere genuine portland neighborhood",
"my family great time portland kastners helpful giving suggestions restaurants places hike visit",
"david ali s husband made us feel welcome time met us door left unfortunately able stay one night comfortable place stay time everything clean comfortable just amenities needed br we highly recommend lovely apartment friends br br annette spratt br leavenworth ks",
"we couple third person home absolutely perfect us comfortable beds kitchen facilities microwave bar sink small fridge plates etc the hosts superb warm gracious friendly a 10 minute drive city center a definite return place us",
"much enjoyed ali dave wish time chat them eager provide valuable information things see including kennedy school enjoyed much little apartment upstairs perfect two friends travel together need separate rooms need frequently overlooked typical b bs friend seattle appreciated sharing little kitchenette separate bedrooms br br i m moving portland alabama hope touch ali dave settling in great hosts also interesting people recommend highly anyone traveling portland br br luba",
"huge space friendly owners just needed very nicely located close alberta street bars food portland hippies br br will definitely stay poor",
"clean place nice people good coffee", "what fabulous place stay it s beautiful house rental space great way beyond expectations you can walk new seasons coffee shops alberta killingsworth around lovely neighborhood nearby parks it s lovely sit front porch just happy portland br br david ali wonderful hosts they friendly informative welcoming my first night took time sit porch talk making feel especially welcome br br i imagine staying anywhere else portland next visit",
"david ali great hosts upstairs clean comfortable the neighborhood nice great restaurants within walking distance a great place stay",
"my daughters enjoyed stay much david ali wonderful hosts helpful the neighborhood nice ali david gave girls discount coupon one local sushi restaurants enjoyed much br we definitely recommend br br br",
"ali david wonderful hosts they warm generous spirits made us feel welcome br br the house located beautiful neighborhood front back gardens lush green it s gorgeous spacious house hardwood floors the upstairs stayed great its completely new clean everything need a big comfy bed nice view garden small kitchen ish area fridge sink microwave everything perfectly new clean good order br br eric i cat people although two new teenage cats stay downstairs plenty time play pet them really liked it real comfort us stay there home away home describes perfectly br br if plans visit portland place stay br br we hope stay next trip portland already recommended family coming visit future br br rating 10 plus stars",
"i pulled house ali david porch gave warm welcome it felt like staying friends rather strangers a really comfortable apartment within walking distance alberta arts district the apartment clean comfortable quiet i will definitely stay again",
"we great time visiting family portland staying ali david s home very clean quiet sleeping pleasant environment david ali friendly low key perfect hosts close alberta new seasons good stuff definitely recommend place anyone",
"great hosts great place great neighborhood ali david bent backwards make sure stay incredible the place cozy inviting everything just right the neighborhood lacks nothing i ll stay sure",
"ali dave s house gorgeous upstairs apartment awesome it super clean spacious well decorated stocked little kitchenette plates utensils clean towels shower they super friendly hosts cute cats even gave us fresh coffee grounds the area really great too reason may stay now planning buy place near",
"oh always really lovely time ali david s pretty festive home as usual fun exchanges books cats recipes thank you ali david",
"ali david great hosts we felt comfortable living situation will repeat next time chance the home great neighborhood within walking distance needs our regret getting know hosts better seem like great people",
"ali dave great hosts br br they kind thoughtful welcoming warm and oh helpful information go do br br because visit working retreat insider information helped make great use time br br i got choice rooms picked smaller one just right amount space one person cozy comfortable br and within walking distance alberta street i needed great shops restaurants fantastic",
"a perfect 10 i wonderful stay ali david from first ali responsive via email easy arrange stay when i arrived david greeted got settled the rooms wonderful david made sure i warm enough the rooms classic portland simple uncluttered big windows looking green trees ali supplied tea small fridge milk etc the big bed comfy perfect snuggling blankets rain drumming softly roof in evenings i enjoyed hanging them sitting fire playing kitties walking concordia alehouse fries drink",
"ali david great hosts friendly easy talk to gave us real welcome home portland feel the suite comfortable we enjoyed mini kitchen convenience stocked coffee too the spacious warm bedroom with extra blankets provided needed privacy much appreciated the neighborhood quiet beautiful close everything we strongly recommend staying portland ali david hope able return someday",
"david ali wonderful house just blocks eclectic lively alberta street northwest pdx the upstairs space available comfortable roomy perfect stays length br br both david ali offered great advice must dos pdx first timer generous offering extra bicycle weekend making initial two wheeled bridgetown experience authentic br br next time i m back i ll here",
"ali david wonderful hosts provided really great place stay very accommodating flexible house beautiful parking easy everything exceeded expectations hesitate stay again",
"ali david s suite spacious lovely clean private there small kitchen area coffee maker coffe tea provided ali david great hosts friendly helpful i able park car front house every night just short walk interesting alberta arts district",
"this first stay booked via airbnb fantastic david allie responsive first booking email i departed they available helpful i also felt i good bit privacy the space lovely coffee maker coffee microwave fridge the location also great near airport neighborhood lots going on available easy parking i enjoyed nearby new seasons market extracto coffee the wifi included fast i able watch shows hulu check e mail etc i slept well quite bed comfy lots blankets pillows provided",
"we much enjoyed stay the kastner s suite cold perfect the space really large multiple rooms plenty closet space the bed truly comfortable linens nicely done plenty hot water there small kitchenette area provided coffee they live beautiful quiet street able park right front house every night even though private entrance space still felt private in fact times coming going either ali david home since come front door chances visit added enjoyment staying there we hope stay whenever portland",
"jenny i attended acupuncture class portand delightful stay br with david alison their lovely home quick walk great restaurants br a grocery store yoga studio etc david alison excellent hosts br providing beautiful quiet place stay generously inviting us join br in neighborhood events they great suggestions enjoy area br including lending us 2 bicycles explore it we wonderful time br highly recommend staying them br",
"ali david accommodating space clean due flight cancellations travel disasters time ali david cut short one night kind enough offer us refund stayed late following evening welcome us home david even made list vegetarian restaurants open late i grab food finally got there the space clean warm hosts beyond kind welcoming our brief memories portland definitely shaped ali david s hospitality upon returning portland love stay will recommend friends future",
"ali dave great unfortunately i much loved spend time alberta arts district the neighborhood cute felt safe the bus one block away i loved eats coffee cup saucer cafe the space ample clean sleep several it nice cup tea getting ready day thank dave ali accommodation random hours",
"what delightful surprise lovely home lovely gardens welcoming hosts we two couples plenty room us",
"this first experience airbnb great start the home tastefully decorated quiet ali david gracious helpful the neighborhood beautiful great restaurants interesting art galleries walking distance",
"we wonderful four day stay all advertised meticulously clean wonderfully comfortable space ali david thoughtful relaxed helpful hosts plus great location lovely home cute kitties recommended without qualification",
"lovely house suite entire second floor clean spacious easy go downtown portland using public bus just 2 blocks away alberta arts district st something recommendable specially last thursday month ali david great hosts knowledgeable city",
"we wonderful experience beautiful house lovely people the rooms spotless comfortable welcome received david ali warm friendly br this area portland full nice cafes restaurants within walking distance within easy access city centre",
"dave waiting us front yard late nightly arrived perfect host moment on ali town much stay enjoyed meeting well the rooms nice coffee welcome space absolutely spotless we enjoyed immensely happy stay again thanks making wonderful experience",
"beautiful area helpful hosts they flexible time wise ex helped late checkout i ve never seen beautiful sidewalk 31st venue alberta br br the space nicely appointed refinished attic including shower plenty hot water sink fridge 2 rooms beds there air conditioning floor fan keeping windows open fine us watch low ceiling tall like me br br internet provided fast wife completely unable connect if depend 100 reliable quick internet bring plan wifi time around nearby cafe s opening hours br br for liesure traveler great spot 2 buses nearby couple inexpensive restaurants within 15 minute walk br br if use hidden airbnb maps note zipcode phone number hidden airbnb phone number hidden airbnb can really confuse things via bus can get downtown within phone number hidden airbnb minutes depending timeliness route make sure note odd bus fare 2 05 via cab 15 downtown 20 airport br br anyway i hope expanse tips prove useful you alberta arts great place consider looking relaxing leisure trip portland",
"the alberta arts suite just perfect i traveled 18 year old daughter 2 bedrooms worked great the suite just pictured clean modern everything need stay the house located beautiful neighborhood portland ali david wonderful hosts when come portland again will stay again",
"david ali superb hosts their home front gardens lovely upstairs suite guests just weary travelers needed the space gave us room spread relax perfect the alberta neighborhood fun us explore fun shopping resale shops great restaurants galleries within walking distance i hesitate recommend spot friends thanks great stay david ali",
"we wonderful time ali david s home the space beautiful extremely clean quiet hosts considerate accommodating ie made iron ironing board available us helped faulty internet connection laptop offered advice city transportation overall stay ali david again recommend travelers",
"we wonderful stay really wonderful people went beyond ensuring comfortable stay good location great experience",
"my friend i enjoyed ali david s place immensely it perfect needed great snapshot great pdx neighborhood i ll come back sure",
"the stay wonderful room clean nice my girlfriend i felt welcome i definitely stay again",
"we wonderful stay ali dave generous helpful from kind welcome directions recharging ipod whole experience made stay portland great",
"i want live accommodation well thought supplied great location intelligent gentle attentive hosts a real winner",
"if going portland couple nights longer fantastic place stay great neighborhood easy walk bike things might want ali david wonderful hosts",
"ali david great hosts their space cute clean they accommodating made sure everything needed they also good suggesting delicious neighborhood restaurants if ever portland area will definitely checking see space available",
"the alberta arts studio great place weekend visit the suite lots space clean uncluttered the neighbourhood fantastic lots great restaurants shops within 10min walk it 30min leisurely bike ride downtown lovely neighbourhoods we found david ali friendly helpful tips suggestions things do the studio lots portland magazines maps us read on it also great use bikes although kitties may suffer allergies they come suite day so friends definitely feeling itchy eyed br having stayed great place definitely added fantastic portland weekend getaway",
"once again great stay we love ali david s house neighborhood this second stay time three us their place just great three two thanks",
"we great time alberta arts a nive location portland great city the room clean spacious the hosts helpfull nice people general we will come back area sure",
"lovely place stay great hosts", "my husband adult daughter i enjoyed stay ali david they greeted us street evening made us feel welcome comfortable they quick help forgotten shampoo providing ironing board iron needed them we used rooms just like photos clean clutter free they live beautiful portland neighborhood fun restaurants shops i recommend contact need place two nights portland br",
"my daughter i enjoyed stay ali dave they nicer my flight arrived late friday dave waiting outside umbrella pulled 11 pm they great communicators along way the rooms comfortable quiet peaceful amenities internet microwave fridge sink advertised they informative gracious hosts providing right measure privacy help finding looking for my daughter mentioned enjoyed spoken word next morning found note date time venue poetry slam went enjoyed immensely web searching find otherwise known this i doubt hotel concierge taken time find us i highly recommend staying dave ali return get portland again",
"spacious quiet comfortable additional benefit small kitchenette very accessible public transportation close airport great choice anyone wants ne portland",
"alison david went beyond expectations hosts incredibly kind warm people they made us feel welcome home immediately questions concerns even just chat br br the private space upstairs house quiet cozy comfortable they attended amenities even finer details br br we amazing stay here slept like babies night stay anywhere else come back portland br br thanks ali david",
"this first experience airbnb will certainly back ali david wonderful hosts two bedrooms upstairs space husband 16 year old daughter i stayed comfortable quiet amenities possibly wanted everything went smoothly we also liked within walking distance restaurants cafes shops within easy driving distance downtown portland lewis clark college omsi",
"our stay comfortable quiet i agree others said cleaner nicer pictures might indicate seemed brand new spotless ali david accommodating hosts david met us helped carry bags upstairs br my warning might six two ceilings attic type husband connected ceiling one occasion i however loved it felt cozy roomy since heighth foot shorter his i definitely recommend it",
"very comfortable quiet the entire upstairs floor classic portland bungalow ali husband made feel right home super easy make reservation even though i contacted last minute place stay i live portland town visitor location perfect access portland s fun unique shopping dining areas",
"ali david wonderful hosts we needed quiet secluded place days exactly got we whole second floor private bathroom it also quiet clean the neighborhood wonderful everything needed within walking distance grocery store restaurants yoga we recommend place others",
"the accommodations clean quiet david ali helpful cheerful hosts we enjoyed visiting look forward return visit soon we love location well since close wonderful new season s market alberta street restaurants street parking easy all pleasant stay comfortable clean surroundings excellent hosts",
"we delightful stay ali david just new years their upstairs guest suite met needs perfectly clean comfortable quiet charming part portland we definitely recommend place anyone",
"ali david friendly hosts made sure needed we good stay them room again",
"ali s place perfect just advertised i plenty privacy lots space i definitely stay again"
)), row.names = c(NA, 80L), class = "data.frame")
I have done the preprocessing part and I want ti filter the data frame on two parts containing some strings "pets," "pet," "cat," "cats," "dog," and "dogs"
I have tried the following
Filter_pets<-sample_data %>%
filter(grepl("dog|cat|pet|pets|dogs|cats ",comments))
and
Filter_no_pets<-USA_data %>%
filter(!grepl("pet|^cat|dog|pets|dogs|cats",comments))
It is not prodicing the desired results. For example, if some word is there called "Cater" it still filters it to assign it to the first data frame. Also it is not capturing everu term inclduing "pets"
Can anyone help?
Your regex alternation should be surrounded by word boundaries on both sides:
Filter_pets <- sample_data %>%
filter(grepl("\\b(?:dogs?|cats?|pets?)\\b", comments))
This will match cat as a standalone word but not cater.

Concatenate strings by group with dplyr - problem w R skipping rows?

I have a dataframe all_text, with two columns: txt and filename. Each txt row represents a page of a PDF file, which I extracted using pdftools. I wanted to concatenate each page into one cell, so that the entire text of the file is in one long string. I did this with the following:
With some sample data:
dat <- data.frame(filename = c("file_1","file_1","file_1","file_1","file_1", "file_1", "file_1", "file_1"),
txt = c("OUR AMERICAN GOVERNMENT
DEMOCRACY AND ITS AMERICAN INTERPRETATION
1. What is the purpose of the U.S. Government?
The purpose is expressed in the preamble to the Constitution:
‘‘We the People of the United States, in Order to form a more perfect Union, establish Justice, insure domestic Tranquility, provide
for the common defense, promote the general Welfare, and secure
the Blessings of Liberty to ourselves and our Posterity, do ordain
and establish this Constitution for the United States of America.’’
2. What form of government do we have in the United
States?
The United States, under its Constitution, is a federal, representative, democratic republic, an indivisible union of 50 sovereign
States. With the exception of town meetings, a form of pure democracy, we have at the local, state, and national levels a government
which is: ‘‘federal’’ because power is shared among these three levels; ‘‘democratic’’ because the people govern themselves and have
the means to control the government; and ‘‘republic’’ because the
people choose elected delegates by free and secret ballot.
3. What is the role of the citizen in our Government?
The United States today is even more of a participatory democracy than was envisioned by the Founders when they established
a government ‘‘of the people, by the people, and for the people,’’ as
President Abraham Lincoln later described it. Along with the constitutional responsibilities which accompany citizenship, such as
obeying laws and paying taxes, the citizen is afforded a wide range
of rights and opportunities to influence the making of public policy
by the Government.
At the most basic level, the right to vote gives the citizen a
chance to help select those who will ultimately be responsible for
determining public policy. Beyond casting the ballot, a citizen may
actively assist in nominating and electing preferred public officials
through volunteer activities and campaign donations. The participation of citizens in the electoral process contributes greatly to the
sense of legitimacy of the Government.
Citizen involvement in the Government need not be manifested
only during election campaigns. Legislators are accustomed to
hearing from constituents expressing opinions about issues of the
day, and procedures exist that mandate that executive agencies
allow time for public comment before proposed regulations become
final. Individuals may also join with others who hold similar views
",
"to make the most of their influence with Government on particular
issues; this is how interest groups or political action committees
are established and the lobbying process begins.
4. What contributions has our country made to the institution of government?
Some of the U.S. contributions to the institution of government
are as follows: a written constitution, an independent judiciary to
interpret the Constitution, and a division of powers between the
Federal and State Governments.
THE CONSTITUTION
5. What is the Constitution?
The Constitution is the basic and supreme law of the United
States. It prescribes the structure of the U.S. Government, provides
the legal foundation on which all its actions must rest, and enumerates and guarantees the rights due all its citizens.
The Constitution is a document prepared by a convention of delegates from 12 of the 13 States that met at Philadelphia in 1787.
The original charter, which replaced the Articles of Confederation
and which became operative in 1789, established the United States
as a federal union of States, a representative democracy within a
republic. The framers provided a Government of three independent
branches. The first is the legislature, which comprises a two-house
or bicameral Congress consisting of a Senate, whose Members are
apportioned equally among the States, and a House of Representatives, whose Members are apportioned among the States according
to population. The second, the executive branch, includes the President and Vice President and all subordinate officials of the executive departments and executive agencies. The third branch, the judiciary, consists of the Supreme Court and various subordinate
Federal courts created by public law.
The 27 amendments approved since 1791 are also an integral
part of the Constitution. These include amendments 1 through 10,
known collectively as the Bill of Rights, and amendments 11
through 27, which address a wide range of subjects. At the present
time, four amendments without ratification deadlines are pending
before the States. These deal with congressional apportionment,
child labor, titles of nobility from foreign powers, and certain
States rights (in a pre-Civil War proposal). In addition, the ratification deadlines expired on two proposed amendments, which had
been approved by Congress in the 1970s: i.e., equal rights for
women and men and voting representation for the District of Columbia in the Senate and House.
6. What were the basic principles on which the Constitution
was framed?
The framers of the Constitution debated and agreed to the following six basic principles:
1. That all States would be equal. The National Government
cannot give special privileges to one State.",
"2. That there should be three branches of Government—one
to make the laws, another to execute them, and a third to interpret them.
3. That the Government is a government of laws, not of men.
No one is above the law. No officer of the Government can use
authority unless and except as the Constitution or public law
permits.
4. That all men are equal before the law and that anyone,
rich or poor, can demand the protection of the law.
5. That the people can change the authority of the Government by changing (amending) the Constitution. (One such
change provided for the election of Senators by direct popular
vote instead of by State legislatures).
6. That the Constitution, and the laws of the United States
and treaties made pursuant to it, are ‘‘the supreme Law of the
Land.’’
7. What is the Bill of Rights?
The Bill of Rights is a series of constitutionally protected rights
of citizens. The first 10 amendments to the Constitution, ratified by
the required number of States on December 15, 1791, are commonly referred to as the Bill of Rights. The first eight amendments
set out or enumerate the substantive and procedural individual
rights associated with that description. The 9th and 10th amendments are general rules of interpretation of the relationships
among the people, the State governments, and the Federal Government. The ninth amendment provides that the ‘‘enumeration in the
Constitution, of certain rights, shall not be construed to deny or
disparage others retained by the people.’’ The 10th amendment
reads: ‘‘The powers not delegated to the United States by the Constitution, nor prohibited by it to the States, are reserved to the
States respectively, or to the people.’’
8. What are the rights enumerated in the Bill of Rights?
Right to freedom of religion, speech, and press (Amendment
I);
Right to assemble peaceably, and to petition the Government
for a redress of grievances (Amendment I);
Right to keep and bear arms in common defense (Amendment II);
Right not to have soldiers quartered in one’s home in peacetime without the consent of the owner, nor in time of war except as prescribed by law (Amendment III);
Right to be secure against ‘‘unreasonable searches and seizures’’ (Amendment IV);
Right in general not to be held to answer criminal charges
except upon indictment by a grand jury (Amendment V);
Right not to be put twice in jeopardy for the same offense
(Amendment V);
Right not to be compelled to be a witness against oneself in
a criminal case (Amendment V);",
"Right not to be deprived of life, liberty, or property without
due process of law (Amendment V);
Right to just compensation for private property taken for
public use (Amendment V);
Right in criminal prosecution to a speedy and public trial by
an impartial jury, to be informed of the charges, to be confronted with witnesses, to have a compulsory process for calling witnesses in defense of the accused, and to have legal counsel (Amendment VI);
Right to a jury trial in suits at common law involving over
$20 (Amendment VII);
Right not to have excessive bail required, nor excessive fines
imposed, nor cruel and unusual punishments inflicted (Amendment VIII).
9. How may the Constitution be amended?
Amending the Constitution involves two separate processes.
First, amendments may be proposed on the initiative of Congress
(by two-thirds affirmative vote in each House) or by convention (on
application of two-thirds of the State legislatures). So far, a convention has never been called.
The second step is ratification of a proposed amendment. At the
discretion of Congress, Congress may designate ratification either
by the State legislatures or by conventions. Ratification requires
approval by three-fourths of the States. Out of the 27 amendments,
only one (the 21st, ending Prohibition) has been ratified by State
conventions.
The first 10 amendments (ratified in 1791) were practically a
part of the original instrument. The 11th amendment was ratified
in 1795, and the 12th amendment in 1804. Thereafter, no amendment was made to the Constitution for 60 years. Shortly after the
Civil War, three amendments were ratified (1865–70), followed by
another long interval before the 16th amendment became effective
in 1913. The most recent amendment, the 27th, was ratified on
May 7, 1992. At the present time, there are four amendments
pending before the States that were proposed without ratification
deadlines.
10. How long may a proposed amendment to the Constitution remain outstanding and open to ratification?
The Supreme Court has stated that ratification must be within
‘‘some reasonable time after the proposal.’’ Beginning with the 18th
amendment, it has been customary for Congress to set a definite
period for ratification. In the case of the 18th, 20th, 21st, and 22nd
amendments, the period set was 7 years, but there has been no determination as to just how long a ‘‘reasonable time’’ might extend.
In the case of the proposed equal rights amendment, the Congress extended the ratification period from 7 to approximately 10
years; but the proposed Amendment was never ratified.
The ‘‘reasonable time’’ doctrine recently arose, as well, in connection with an amendment pertaining to congressional pay, proposed
in 1789 without a ratification deadline. The 38th State, Michigan, ",
"ratified this amendment on May 7, 1992–203 years after its proposal. The amendment was certified by the Archivist of the United
States, since it did not carry a term limitation, as the 27th Amendment to the Constitution.
11. What is the ‘‘lame duck’’ amendment?
The ‘‘lame duck’’ amendment is the popular name for the 20th
amendment to the Constitution, ratified on February 6, 1933. It is
designed to limit the time that elected officials can serve after the
general election in November. This amendment provides, among
other things, that the terms of the President and Vice President
end at noon on January 20, the terms of Senators and Representatives end at noon on January 3, and the terms of their successors
then begin.
Prior to this amendment, the annual session of Congress began
on the first Monday in December (Article 1, Section 4). Since the
terms of new Members formerly did not begin until March 4, Members who had been defeated or did not stand for reelection in November continued to serve during the lame duck session from December until March 4. Adoption of the 20th amendment has reduced but not eliminated legislation by a Congress that does not
represent the latest choice of the people. For instance, 11 of the 33
Congresses from 1933 to 1999 (73rd through the 105th Congress)
continued to meet after the November general elections.
12. Have any amendments to the Constitution been repealed?
Only one, the 18th amendment (Prohibition), ratified in early
1919, was repealed by the 21st amendment in late 1933.
13. What is meant by the ‘‘separation of powers’’ and ‘‘checks
and balances’’ in the Federal Government?
The separation of powers and checks and balances are two fundamental principles underlying the Constitution. They work together
to prevent a tyrannous concentration of power in any one branch,
to check and restrain Government, and, ultimately, to protect the
rights and liberties of citizens.
The Constitution contains provisions in separate articles for the
three branches of Government—legislative, executive, and judicial.
There is a significant difference in the grants of authority to these
branches, each of which is also given an independent base of political power. The First Article, dealing with legislative power, vests
in Congress ‘‘All legislative Powers herein granted’’; the Second Article vests ‘‘The executive Power’’ in the President; and the Third
Article states that ‘‘The judicial Power of the United States shall
be vested in one Supreme Court, and in such inferior Courts as the
Congress may from time to time ordain and establish.’’ In addition
to this separation and independence among the three branches, the
Constitution sets up ‘‘auxiliary precautions,’’ as James Madison
called them in the Federalist Papers, that allow each branch to
check and balance the others. For instance, the President can veto
bills approved by Congress and nominates individuals to the Federal judiciary; the Supreme Court can declare a law enacted by
Congress or an action by the President unconstitutional; and Con",
"gress can impeach and remove the President and Federal court justices and judges.
THE LEGISLATIVE BRANCH
THE CONGRESS
14. What is Congress?
The Congress of the United States is the legislative (lawmaking)
and oversight (Government policy review) body of our National
Government, and consists of two Houses—the Senate and the
House of Representatives.
MEMBERS, OFFICES, AND STAFF
15. What qualifications are prescribed for a Member of Congress?
The Constitution (Article 1, Section 2 for the House and Section
3 for the Senate) prescribes qualifications for Members of Congress.
A Member of the House of Representatives must be at least 25
years of age when entering office, must have been a U.S. citizen for
at least seven years, and must be a resident of the State in which
the election occurred.
A Member of the U.S. Senate must be at least 30 years of age
to enter office, must have been a U.S. citizen for nine years, and
must be a resident of the State in which the election occurred.
16. What is the term of a Congress and how often must it
meet?
A Congress begins at noon, January 3 of each odd-numbered year
following a general election, unless by law a different day is designated. A Congress lasts for two years, with each year normally
constituting a separate session.
The Legislative Reorganization Act of 1970 requires Congress to
adjourn sine die not later than July 31 of each year unless there
is a declared war, or unless Congress otherwise provides. In oddnumbered years, Congress must take an August recess if it fails to
adjourn by July 31.
Neither the House nor the Senate may adjourn for more than
three days (excluding Saturdays, Sundays, and holidays) without
the concurrence of the other Chamber. It has also become a common practice for Congress to adjourn after making provision for the
House and Senate leaders to summon Congress back into session
in emergency circumstances. Similarly, the Constitution grants the
President the authority to summon the Congress for a special session if circumstances require.
17. How many Members does each State have in the Senate
and House of Representatives?
Each State, under the Constitution, is entitled to two Senators,
each serving a six-year term, and at least one Representative, serving a two-year term. Additional House seats are apportioned on the
basis of State population. (See State Population and House Apportionment table in Appendix.)
VerDate jul 14 2003 14:35 Feb 25, 2004 Jkt 087102 PO 00000 Frm 00012 Fmt 6633 Sfmt 6602",
"18. What is the size of the House of Representatives and how
is it determined?
The membership of the House of Representatives is fixed in law
at 435 Members representing the 50 States. In addition to the 435
Representatives, there is one Delegate for each of the following: the
District of Columbia, the Virgin Islands, Guam, and American
Samoa (each elected for a two-year term); as well as a Resident
Commissioner from Puerto Rico (elected for a four-year term). The
Delegates and the Resident Commissioner can sponsor legislation
and vote in committees, but not in the House Chamber.
The Constitution entitles each State to at least one Representative. Beyond this minimum, Representatives are apportioned
among the States according to population. Population figures used
for apportionment are determined on the basis of each 10-year census. (Following the 1990 census, the average district size was about
570,000 people). Since 1941, Congress has used the method of
‘‘equal proportions’’ to calculate actual apportionment, in order to
minimize the differences in district populations among the States.
19. Who defines the congressional districts—the Federal
Government or the States?
Congress fixes the size of the House of Representatives, and the
procedure for apportioning the number of Representatives among
the States, and the States themselves proceed from there. State
legislatures pass laws defining the physical boundaries of congressional districts, within certain constraints established by Congress
and the Supreme Court (through its reapportionment and redistricting rulings). Each State is apportioned its number of Representatives by means of the Department of Commerce’s decennial
census.
In the very early years of the Republic, most States elected their
Representatives at large. The practice of dividing a State into districts, however, was soon instituted. Congress later required that
Representatives be elected from ‘‘districts composed of a contiguous
and compact territory,’’ but this requirement is no longer in Federal law.
The redistricting process has always been provided for by State
law, but Congress can choose to exercise greater authority over redistricting. In 1967, for example, Congress by law prohibited atlarge elections of Representatives in all States entitled to more
than one Representative. Today, all States with more than one
Representative must elect their Representatives from single-Member districts.
20. What is a Member of Congress?
A Member of Congress is a person serving in the Senate or the
House of Representatives. A Member of the Senate is referred to
as Senator, and a Member of the House of Representatives, as Representative or Congressman or Congresswoman.",
"21. What is a Delegate or Resident Commissioner, as distinguished from a Representative?
The office of Delegate was established by ordinance from the
Continental Congress (1774–89) and confirmed by a law of Congress. From the beginning of the Republic, accordingly, the House
of Representatives has admitted Delegates from Territories or districts organized by law. Delegates and Resident Commissioners
may participate in House debate but they are not permitted to vote
on the floor. All serve on committees of the House and possess powers and privileges equal to other Members in committee, including
the right to vote in committee. Currently, there are four Delegates
in the House and one Resident Commissioner.
22. What oath of office is required for Members of Congress,
and when is it administered?
Article VI of the U.S. Constitution requires that Members of Congress, and all executive and judicial officers, shall be bound by oath
or affirmation to support the Constitution. The oath of office is as
follows: ‘‘I, AB, solemnly swear (or affirm) that I will support and
defend the Constitution of the United States against all enemies,
foreign or domestic; that I will bear true faith and allegiance to the
same; that I take this obligation freely, without any mental reservation or purpose of evasion; and that I will well and faithfully discharge the duties of the office on which I am about to enter. So help
me God.’’
Representatives take the oath of office on the first day of the new
Congress, immediately after the House has elected and sworn in its
Speaker. Those Senators elected or reelected the previous November take the oath of office as the first item of business when the
Senate convenes the following January. Representatives elected in
special elections during the course of a Congress, and Senators appointed or elected to fill a vacancy in the Senate, generally take the
oath of office on the floor of their respective Chamber when the
Clerk of the House or the Secretary of the Senate has received formal notice of the new Member’s election or appointment from State
government authorities. On rare occasions, because of illness or
other circumstances, a Member-elect has been authorized to take
the oath of office at a place other than the House or Senate Chamber. In those circumstances, the Clerk of the House or Secretary of
the Senate sees to the proper administration of the oath.
23. In the event of the death, resignation, or declination (refusal to serve) of a Member of Congress, how is the vacancy filled?
The Constitution (Article II, Section 2, Clause 4) requires that all
vacancies in the House of Representatives be filled by election. All
States require special elections to fill any House seat that becomes
vacant during the First Session of a Congress. Procedures governing vacancies occurring during the Second Session of a Congress
differ from State to State, and are largely dependent on the
amount of time intervening between the vacancy and the next general election." ))
And the code that brings it together:
all_text <- all_text %>%
group_by(filename) %>%
summarise(all_pages = paste0(txt, collapse = ""))
It seems to work, but when I look at the summarised cell, some of the rows (file pages) arent being brought in.
Is there some sort of limit to R cell sizes that might be affecting this? When I try to remove all the breaks from the strings to make them smaller, and then concatenate, it's still only bringing certain rows.
TIA!

Meaning of timekeeper and oriented

What is the meaning of oriented and timekeeper in below sentence.
From google: Timekeeper means one who records the time in sports. and
oriented means positioned or faces towards
but could not understand it in below context. Can you explain it in simple speech?
Our global time system is oriented to the Sun. The relationship between sun and earth is considered as the best time keeper in the world.
Source of information is below.
What they are saying is We base our time as a society (when to go to work, eat, sleep) on the cycle of the sun. sunrise, noon, sunset.
Louis Essen built the first Cesium clock in 1955. That's an atomic clock so accurate that it doesn't lose time.

epub 2-column page break and layout

I am creating a 2-column epub book for a specific device. My problem is that when I use css to specify the columns ( -webkit-column-count: 2; -webkit-column-rule: 0px;), the end result is:
on Page 1 it shows (Part 1 | Part 3), and
on Page 2 it shows (Part 2 | Part 4) of the poem.
I would prefer to do it in a more natural book flow, which should show
(Part 1 | Part 2) on page 1, and continue to
(Part 3 | Part 4) on page 2.
Is there a way to archive this?
Some additional notes:
I tried to limit the column height but all it does is to add a 3rd column, which is not what I want.
The content of the book is dynamically generated, and thus, I cannot specify the location of the break ahead of time.
What are you applying the column count to?
http://jsfiddle.net/carolrmckay/FECr9/4/
.columncount
{
-webkit-column-count: 2; -webkit-column-rule: 0px;
}
strong
{
font-weight:bold;
}
<ul>
<li class="columncount"><p><strong>Chapter</strong> 1 – Down the Rabbit Hole: Alice is feeling bored while sitting on the riverbank with her sister, when she notices a talking, clothed White Rabbit with a pocket watch run past. She follows it down a rabbit hole when suddenly she falls a long way to a curious hall with many locked doors of all sizes. She finds a small key to a door too small for her to fit through, but through it she sees an attractive garden. She then discovers a bottle on a table labelled "DRINK ME", the contents of which cause her to shrink too small to reach the key which she has left on the table. A cake with "EAT ME" on it causes her to grow to such a tremendous size her head hits the ceiling.</p>
<p><strong>Chapter</strong> 2 – The Pool of Tears: Alice is unhappy and cries as her tears flood the hallway. After shrinking down again due to a fan she had picked up, Alice swims through her own tears and meets a Mouse, who is swimming as well. She tries to make small talk with him in elementary French (thinking he may be a French mouse) but her opening gambit "Où est ma chatte?" (that is "Where is my cat?") offends the mouse.
</p>
<p><strong>Chapter</strong> 3 – The Caucus Race and a Long Tale: The sea of tears becomes crowded with other animals and birds that have been swept away by the rising waters. Alice and the other animals convene on the bank and the question among them is how to get dry again. The mouse gives them a very dry lecture on William the Conqueror. A Dodo decides that the best thing to dry them off would be a Caucus-Race, which consists of everyone running in a circle with no clear winner. Alice eventually frightens all the animals away, unwittingly, by talking about her (moderately ferocious) cat.
</p>
<p><strong>Chapter</strong> 4 – The Rabbit Sends a Little Bill: The White Rabbit appears again in search of the Duchess's gloves and fan. Mistaking her for his maidservant, Mary Ann, he orders Alice to go into the house and retrieve them, but once she gets inside she starts growing. The horrified Rabbit orders his gardener, Bill the Lizard, to climb on the roof and go down the chimney. Outside, Alice hears the voices of animals that have gathered to gawk at her giant arm. The crowd hurls pebbles at her, which turn into little cakes. Alice eats them, and they reduce her again in size.
</p>
<p><strong>Chapter</strong> 5 – Advice from a Caterpillar: Alice comes upon a mushroom and sitting on it is a blue Caterpillar smoking a hookah. The Caterpillar questions Alice and she admits to her current identity crisis, compounded by her inability to remember a poem. Before crawling away, the caterpillar tells Alice that one side of the mushroom will make her taller and the other side will make her shorter. She breaks off two pieces from the mushroom. One side makes her shrink smaller than ever, while another causes her neck to grow high into the trees, where a pigeon mistakes her for a serpent. With some effort, Alice brings herself back to her usual height. She stumbles upon a small estate and uses the mushroom to reach a more appropriate height.
The Cheshire Cat
</p>
<p><strong>Chapter</strong> 6 – Pig and Pepper: A Fish-Footman has an invitation for the Duchess of the house, which he delivers to a Frog-Footman. Alice observes this transaction and, after a perplexing conversation with the frog, lets herself into the house. The Duchess's Cook is throwing dishes and making a soup that has too much pepper, which causes Alice, the Duchess, and her baby (but not the cook or grinning Cheshire Cat) to sneeze violently. Alice is given the baby by the Duchess and to her surprise, the baby turns into a pig. The Cheshire Cat appears in a tree, directing her to the March Hare's house. He disappears but his grin remains behind to float on its own in the air prompting Alice to remark that she has often seen a cat without a grin but never a grin without a cat.
</p>
<p><strong>Chapter</strong> 7 – A Mad Tea-Party: Alice becomes a guest at a "mad" tea party along with the March Hare, the Hatter, and a very tired Dormouse who falls asleep frequently, only to be violently woken up moments later by the March Hare and the Hatter. The characters give Alice many riddles and stories, including the famous 'Why is a raven like a writing desk?'. The Hatter reveals that they have tea all day because Time has punished him by eternally standing still at 6 pm (tea time). Alice becomes insulted and tired of being bombarded with riddles and she leaves claiming that it was the stupidest tea party that she had ever been to.
Alice trying to play croquet with a Flamingo.
</p>
<p><strong>Chapter</strong> 8 – The Queen's Croquet Ground: Alice leaves the tea party and enters the garden where she comes upon three living playing cards painting the white roses on a rose tree red because the Queen of Hearts hates white roses. A procession of more cards, kings and queens and even the White Rabbit enters the garden. Alice then meets the King and Queen. The Queen, a figure difficult to please, introduces her trademark phrase "Off with his head!" which she utters at the slightest dissatisfaction with a subject. Alice is invited (or some might say ordered) to play a game of croquet with the Queen and the rest of her subjects but the game quickly descends into chaos. Live flamingos are used as mallets and hedgehogs as balls and Alice once again meets the Cheshire Cat. The Queen of Hearts then orders the Cat to be beheaded, only to have her executioner complain that this is impossible since the head is all that can be seen of him. Because the cat belongs to the Duchess, the Queen is prompted to release the Duchess from prison to resolve the matter.
</p>
<p><strong>Chapter</strong> 9 – The Mock Turtle's Story: The Duchess is brought to the croquet ground at Alice's request. She ruminates on finding morals in everything around her. The Queen of Hearts dismisses her on the threat of execution and she introduces Alice to the Gryphon, who takes her to the Mock Turtle. The Mock Turtle is very sad, even though he has no sorrow. He tries to tell his story about how he used to be a real turtle in school, which the Gryphon interrupts so they can play a game.
</p>
<p><strong>Chapter</strong> 10 – Lobster Quadrille: The Mock Turtle and the Gryphon dance to the Lobster Quadrille, while Alice recites (rather incorrectly) "'Tis the Voice of the Lobster". The Mock Turtle sings them "Beautiful Soup" during which the Gryphon drags Alice away for an impending trial.
</p>
<p><strong>Chapter</strong> 11 – Who Stole the Tarts?: Alice attends a trial whereby the Knave of Hearts is accused of stealing the Queen's tarts. The jury is composed of various animals, including Bill the Lizard, the White Rabbit is the court's trumpeter, and the judge is the King of Hearts. During the proceedings, Alice finds that she is steadily growing larger. The dormouse scolds Alice and tells her she has no right to grow at such a rapid pace and take up all the air. Alice scoffs and calls the dormouse's accusation ridiculous because everyone grows and she can't help it. Meanwhile, witnesses at the trial include the Hatter, who displeases and frustrates the King through his indirect answers to the questioning, and the Duchess's cook.
</p>
<p><strong>Chapter</strong> 12 – Alice's Evidence: Alice is then called up as a witness. She accidentally knocks over the jury box with the animals inside them and the King orders the animals be placed back into their seats before the trial continues. The King and Queen order Alice to be gone, citing Rule 42 ("All persons more than a mile high to leave the court"), but Alice disputes their judgement and refuses to leave. She argues with the King and Queen of Hearts over the ridiculous proceedings, eventually refusing to hold her tongue. The Queen shouts her familiar "Off with her head!" but Alice is unafraid, calling them out as just a pack of cards; just as they start to swarm over her. Alice's sister wakes her up for tea, brushing what turns out to be some leaves and not a shower of playing cards from Alice's face. Alice leaves her sister on the bank to imagine all the curious happenings for herself.</li>
</ul>​

Resources