text:
Airbus launches ACJneo Family with order from Acropolis Aviation
Airbus has launched the ACJneo (New Engine Option) Family with an order for an ACJ320neo from Acropolis Aviation of Farnborough, near London, which is the first to order the new aircraft.
Delivery of Acropolis' ACJ320neo, which will seat 19 passengers, is planned for the fourth quarter of 2018. Cabin outfitting details and engine choice will be decided later.
Airbus' ACJ320neo features new, more efficient, engines, wingtip-mounted Sharklets, and a more comfortable cabin. Together, these improve fuel burn, range and performance, while delivering an even better ride. The ACJ320neo will be able to fly 25 passengers 6,000 nm/11,100 km.
"Our passengers and team have been delighted with our Airbus ACJ319 and the success that it has achieved with VVIP charter flights over the past five years," says Acropolis Aviation CEO Jonathan Bousfield. "We are excited and proud to be the first launch-customer for the ACJ320neo, which is the cornerstone of our planning for a successful future," he adds.
Airbus' ACJ320neo will be complemented by a new ACJ319neo, also with new engines, Sharklets and a more comfortable cabin, which can fly eight passengers 6,750nm/12,500km.
"Airbus prides itself on innovation and having the world's most modern aircraft family, so launching the ACJneo Family is a natural next step for us in growing the Airbus corporate jet lineup," comments Airbus Chief Operating Officer, Customers, John Leahy. "The ACJneo allows us to offer even more of the comfort, range and value sought by our customers," he adds.
Airbus corporate jets' airliner heritage means that they offer the widest and tallest cabins of any business jet, while being similar in size externally. It also means that they can carry the larger groups that companies, individuals and governments often want to fly. Airbus corporate jets also feature the robust reliability demanded by airlines, and are supported by a worldwide network serving the needs of more than 8,000 aircraft and over 500 customers and operators.
Airbus corporate jets were the first with the enhanced ergonomics and practical protection of fly-by-wire controls that are today's industry standard. They are still the only aircraft in the top-of-the-line bizliner category to do so. They also feature the common cockpit of all Airbus aircraft produced today, extensive weight-saving materials, and cost-saving centralised maintenance.
More than 170 corporate jets have been sold to date, and they are flying on every continent, including Antarctica, highlighting their versatility.


Are you itching for a self indulgent yoga and ski getaway, but can't find the time or energy to coordinate it with your lady friends? Join RE:treat in February 2015 for a luxurious week of yoga, meditation and skiing in beautiful Telluride, Colorado. We will treat you to twice daily yoga sessions, meditation, 2 spa treatments, delicious, healthy food, fabulous company & you will have the chance to ski in one of North America's most sought after ski resorts. Accommodations will be at the luxurious boutique Hotel Madeline in Mountain Village.


Safe & Sound works to keep children and young people safe from exploitation, sexual violence and abuse. We provide specialist 1:1 support to children and young people at risk of and affected by these issues, and deliver training UK-wide to front-line practitioners to improve awareness.
"on behalf of Derbyshire Constabulary Hate Crime Volunteers/Alvaston Ladies Group"
"Great charity to donate to. An amazing team of individuals doing a great job. Have a fantastic Christmas!"
"Right now, and not just at Christmas time, young people need a guide to a better future. My material comforts can be sacrificed a little to help a little. It takes money to help."
"In honour of Chris Simmons' 60th!"
"Im donating after watching Three Girls and seeing a post on Molly Windsor's Instagram. Heres a small amount to help you continue the massively important work you do"


text:
"Feel So Right" is MAX's 22nd single on the Avex Trax label and was released on December 5, 2001. The title track was used as the first ending theme to anime series, Captain Tsubasa: Road to 2002. MAX performed the song on their fifth appearance on NHK singing contest, Kōhaku Uta Gassen.

Track list

Production

Music
 Executive producer - Johnny Taira
 Producer - Max Matsuura
 Co-producer - Junichi "Randy" Tsuchiya
 Mixing - Hiroto Kobayashi
 Mastering - Shigeo Miyamoto

Feel So Right
 Arrangement - Cobra Endo
 Programming - David Huff, Cobra Endo
 Guitars - Dave Cleveland
 Chorus - Yumi Kawamura

Manatsu no Eve
 Arrangement - Takehiro Kawabe
 Programming - Takehiro Kawabe
 Guitars - Takehiro Kawabe
 Chorus - Yumi Kawamura

Art direction & design
 Art direction & design - Katsuhiro Tadokoro
 Photography - Zigen
 Stylist - Akarumi Someya
 Hair & make-up - Keiichi
 Coordinator - Naoki Ueda

Charts
Oricon Sales Chart (Japan)

References

2001 singles
MAX (band) songs
Song recordings produced by Max Matsuura
2001 songs
Avex Trax singles
Songs written by Ari Lehtonen

redpajama_set_name: RedPajamaWikipedia


4 out of 5 dogs have dental problems. Home dental care is of utmost importance for your pups, just like for humans.
Meat flavored natural rubber It prevents plaque and tartar build-up.
Use the Dog Brushing Stick with toothpastes to eliminate tartar/plaque and for fresh breath! Let your dog brush daily for 5 minutes. Nothing makes a more perfect gift for your dog, than this Dog brushing stick.
Allow your dog to chew on the stick for about 10 minutes at a time.
This is enough time to clean his teeth, but not so long that he'll get bored of it.
When his or her 10 minutes are up, you should take the stick and put it up until next time.


text:
Sport Should we expect a boom in livestream concert subscription services?
03:45 14 january 2021 Source: programme-television.org
Ahead of runoffs, civic groups in Georgia mount audacious campaign to mobilize Black voters
More than a dozen groups across the state are trying to drive up turnout among the reliably Democratic bloc. They are up against historical winds, as Georgia runoffs typically draw out a whiter pool of voters than regularly scheduled elections and have traditionally favored Republicans. Though most of the groups are officially nonpartisan, Black voters overwhelmingly support Democrats.
The livestreaming boom . "Never before has the world taken video and live video so seriously," said Luria The growth in livestreaming since the pandemic has been "exponential," said John Petrocelli, the founder and He said cord cutting — cancelling your cable subscription — and technology like
Many artists make the bulk of their income from performing live concerts around the world. One potential solution could be Bandsintown Plus, a new subscription service dedicated to live music.
© Courtesy of Bandsintown Bandsintown recently launched its own subscription service dedicated to livestream concerts.
Despite the cancellation of concerts and festivals, the various players in the sector are determined to bring music to life differently. This is why Bandsintown has just launched its own subscription service, in order to allow music lovers to enjoy a catalog of livestream performances.
Since its launch in 2007, Bandsintown has strived to fill concert halls around the world with its 58 million users. But what happens when these places of entertainment remain tirelessly closed due to the pandemic, plunging into the precariousness of many professionals in the music industry? The application advances a solution in the form of Bandsintown PLUS, a new subscription service dedicated to livestream concerts.
White nationalist Baked Alaska livestreamed himself from inside the US Capitol as he joined rioters
An infamous white nationalist social media personality was among the rioters who stormed the US Capitol, causing lawmakers to evacuate.At the same time, Vice President Mike Pence and lawmakers in the Capitol were evacuated. A pool reporter from inside the Capitol said press and lawmakers were evacuated out of the third floor of the building as protestors entered the second floor where lawmakers were discussing the certification of the 2020 election results in the House chamber.
Bandsintown have launched a new livestream concert subscription service , Bandsintown PLUS, featuring shows from Soccer Mommy, Phoebe Late last year, artists and managers protested a proposed tariff on livestreams in the UK. The Music Managers Forum (MMF) and Featured Artists
May 14, 2020: Livestreams are the new normal at least for the moment, but it's a very big moment for online music performances. Today, we look at just how popular livestreams have become, how the most ambitious artists pull them off, and what to expect in the future.
Each month, American music lovers will be able to attend 25 performances by numerous international artists online. And there is something for everyone: emerging talents like the Californian trio We the Commas and the Canadian ODIE, but also groups as established as Waxahatchee and Rodrigo y Gabriela. Concerts by Phoebe Bridgers, Soccer Mommy, Little Dragon, Empress Of and Chromeo will also be televising on Bandsintown PLUS in the coming weeks. As a bonus: the new service offers various benefits to its members, ranging from intimate Q&A with their favorite artists to access to concerts broadcast on other platforms.
To take advantage of it, all you need to do is pay a monthly subscription of $ 9.99. An amount that is not unlike those of the streaming platforms Netflix, Disney + and even Spotify. "For a year now, we've been hungry for live performances and a chance to support the artists we love. Bandsintown PLUS is an opportunity to break free from the cost and location issues that have often made it difficult to hold. concerts ", explains Fabrice Sergent, associate director of Bandsintown.
35 years with a motorcycle through the world - motorcycle travel photographer Dirk Schäfer in the livestream
Anyone reading MOTORRAD knows Dirk Schäfer's travel reports, which he experiences, writes and photographs himself. He has been giving travel and photo lectures for 15 years. The next one will be live on January 31, 2021 from 5 p.m. in the live stream. © Dirk Schäfer Dirk Schäfer is one of the most renowned travel and motorcycle photographers - in MOTORRAD you can regularly enjoy his motorcycle travel reports.
Livestreams Are the Future of Shopping in America. The U . S . has been slow to shop via live online video Sheri Hensley, co-owner of Pink Coconut Boutique, models clothes during a livestream from Olive She and her husband, Mic (seated), have doubled their company's sales thanks to a boom in
Bandsintown Introduces 'Plus' Subscription Service for Streaming Concerts From Indie Acts. By Chris Willman. The coming show by Adrianne Lenker is touted as her first solo livestream outside of the Big Thief band she also fronts. The concert by Wilco's Tweedy will be a full-band show followed
A new sector that has grossed $ 600 million
Although their regulation is still controversial, livestream concerts are fast becoming a real source of income for artists in need of world tours. According to a recent report from MIDiA Research, these musical performances generated $ 600 million in 2020, with a flurry of paid events staged during the last two months of the year. This was notably the case for Dua Lipa's last immersive concert, "Studio 2054", for which five million tickets had been sold.
"Livestream concerts still have a long way to go, as illustrated by the fact that the penetration rate is only 9% and that their audience is mainly made up of young men", note the authors of the study. If livestream concerts were marginal a few years ago, they will have to be reckoned with in the future. "Livestreaming could be to the live music industry what pay TV is to sports, creating an even bigger market in the long run. But until then, there is still a lot of work to be done."
Where every major character ended up on the final installment of Netflix's 'Chilling Adventures of Sabrina' .
Part four of the series concluded with eight episodes. Here's what happened to Sabrina Spellman, her friends, her family, and her enemies.
Ahead of runoffs, civic groups in Georgia mount audacious campaign to mobilize
White nationalist Baked Alaska livestreamed himself from inside the US Capitol
35 years with a motorcycle through the world - motorcycle travel photographer...
Austria: The Vienna Philharmonic Orchestra's New Year's concert without...
Vienna maintains a New Year's concert without an audience but cancels the ball
Hospitals, businesses offering incentives to those hesitant over COVID-19...
Attention! This January 1, France 2 will be broadcast at 1 p.m. at noon ......
Where every major character ended up on the final installment of Netflix's...
The livestreaming boom isn't slowing down anytime soon
The livestreaming boom . "Never before has the world taken video and live video so seriously," said Luria The growth in livestreaming since the pandemic has been "exponential," said John Petrocelli, the founder and He said cord cutting — cancelling your cable subscription — and technology like mashable.com
Bandsintown Plus offers exclusive concert streams for $10 per month
Many artists make the bulk of their income from performing live concerts around the world. One potential solution could be Bandsintown Plus, a new subscription service dedicated to live music. finance.yahoo.com
Bandsintown launch livestream concert subscription service
Bandsintown have launched a new livestream concert subscription service , Bandsintown PLUS, featuring shows from Soccer Mommy, Phoebe Late last year, artists and managers protested a proposed tariff on livestreams in the UK. The Music Managers Forum (MMF) and Featured Artists www.nme.com
Inside the livestream boom (The Current Music News) - YouTube
Livestream Shopping: It's the Future of U . S . E-Commerce - Bloomberg
Bandsintown Introduces Subscription Service for Streaming Concerts
Live Stream an Event on Facebook | Facebook Business Help Center
Facebook Live lets you livestream events, performances and gatherings on Facebook. Viewers can watch from a phone, computer or connected TV. Reactions, shares, comments, and other interactive features enable you to engage with your audience.
How Do I Downgrade or Cancel My Paid Subscription ? – Livestream
In the Plans section of your account settings, click Select Plan next to the subscription option you wish to downgrade to. This option will stop renewals your current subscription at the end of your payment period, at which time you will not be able to go live or access any content on your account.
States place smokers in line for the Covid-19 vaccine sparking frustration among essential workers
Billy Vunipola set to be lone England Saracen in pre-Six Nations action
The congressional bill that would expand college athletes' rights, explained
States place smokers in line for the Covid-19 vaccine sparking frustration
The congressional bill that would expand college athletes' rights,...

redpajama_set_name: RedPajamaCommonCrawl


text:
An insider's view of building business in China
Jaclyn Densley
Australia's business relationship with China is back in the headlines, after the Government announced the commissioning of a report into selling land to Chinese agricultural interests.
Economists agree that China will play a large part in Australia's future prosperity as their one billion people become more prosperous; however some of our companies are having trouble taping into the Chinese market.
Mona Chung says the general relationship between our countries is very strong; and she would know. Dr Chung was born in Beijing where she took her undergraduate degree in international trade. She now lectures in International Business at Deakin University as well as sitting on the executive board of the Victoria branch of the Australia China Business Council.
"The biggest obstacle we face to a healthy business relationship is a lack of understanding about each other," says Chung. "Australian businesses tend to ignore the cultural differences, which can cause problems for us. Many of the businesses that go to China don't understand the cultural differences or the way the Chinese do business, and so they don't succeed and a lot of resources are wasted."
The big thing to remember when doing business with China is that building relationships is done differently there than here.
"The Chinese won't do business unless they've established a relationship with you. It's extremely serious in China. They have to think of you as family, and that can take two years at minimum," she says. "It can make Australian people uncomfortable, because in Australia you keep family and business separate."
Building a business relationship is different in China than it is in Australia. "There's lots of eating and drinking. Going to China and eating with the Chinese is an important part of relationship building. The history of [eating and trading] goes back two or three thousand years," she says.
In her books, Chung has talked about the mistakes that other companies have made when dealing with China. "One of the very important elements is the 'face' issue," she says, meaning preserving people's status. "During the iron ore negotiations in 2009, Rio Tinto and BHP went and negotiated with Japan first, setting the price. It was a slap in the face to the Chinese, because they couldn't lead the global market and they had lost to Japan."
However Chung says that the major difference between Australian and Chinese businesspeople is their alternative models of thinking.
"The Western thinking model, or the linear model, looks at one particular point or goal and charts the course to get there step by step. We do things one by one. For example, if we have a meeting with a person we close the door, turn off our phone and focus on them," she says.
With the Chinese their thinking is what she calls the "star model".
"What Chinese people are capable of doing is dealing with four or five things at one time. For instance, when you go into a meeting in China you'll find people will be on the phone, leaving the room or talking to other people."
It's simple cultural misunderstandings like these that can poison a healthy business relationship. "To Australians that's rude and disruptive and they can't handle it," she says. "Even some of my clients who have been to China a few times still get uncomfortable or agitated because they're used to the Australian way. It's not because they're rude, it's just because they're able to deal with five or six different things at one."
Chung says that there are a couple of simple things that executives can do to prepare themselves for doing business with China.
"Getting to know the people you're going to meet is vital to a successful business relationship. I say 'give me as much information as you possibly can' and I spend tons of time dealing with the counterparts," she says. "Knowing people's background and connections is when you find out about their capacities."
"Most companies don't do enough homework. Before they jump on the plane, they need to study the markets and the people they'll be dealing with."


Doug Hoskins discusses how the Centuria Diversified Property Fund's planned purchase of its first direct asset represents a step change for the fund.
The Centuria Diversified Property Fund (CDPF) is set to move up a grade as it plans to purchase its first direct commercial property asset in the near future. CDPF has now surpassed $50 million in assets under management and is currently working through a pipeline of direct commercial property assets for potential acquisition.
CDPF is an open-ended unlisted property fund, which has the benefit of a limited monthly withdrawal facility for investors with liquidity considerations. CDPF aims to provide investors with tax-effective monthly income and the potential for long-term capital growth through a diversified commercial property portfolio.
CDPF aims to invest in 80% in real property (both directly and indirectly via investing in units in unlisted property funds) and 20% in liquid assets including A-REITs (15%) and cash (5%).
Once finalised, the purchase of its first direct asset represents a step change for CDPF and should improve its yield. It has always been our intention to purchase direct assets for CDPF as investments increased, enabling us to leverage our in-house property funds management and property services capabilities to unlock greater value for the benefit of investors.
For more than 20 years, Centuria Property Funds Limited (CPFL), the Responsible Entity for CDPF, have been in the business of providing investors access to quality commercial property (that would otherwise be out of reach for many) through unlisted and, more recently, listed property funds.
Quality commercial property – when purchased well and actively managed – has been long recognised for its investment potential. Both listed and unlisted trusts have their advantages (and we believe a sound investment portfolio should incorporate both), the challenge comes in accessing unlisted funds which are more illiquid (with cash locked up for around five years) and a higher entry point (from $50,000).
As a result, CPFL made the decision to create a fund which would offer investors exposure to unlisted property, with limited liquidity – the CDPF. The fund has daily applications and unit pricing, a limited monthly liquidity facility and distributions paid monthly.
Diversification is important, as not all assets in an asset class move in the same direction. For example, according to an industry report, unlisted property funds for retail investors outperformed listed real estate trusts, direct property investments and the broader equities market in 2018. Unlisted property funds delivered a total return of 13.8% over the calendar year according to the latest quarterly report by Zenith Investment Partners, MSCI, the Property Funds Association and the Property Council of Australia1.
Our open-ended CDPF not only offers diversification through its unlisted property fund investments, but also through the geographical diversification of these funds' underlying assets. CDPF is able to offer the best of both worlds – limited liquidity and income.
The current climate for property highlights the importance of funds that offer true diversification. Its diversified mandate sees CDPF continuing to seek opportunities to further diversity its investments with the objective of providing tax-effective monthly income with and the potential for long-term capital growth.
This article was issued by Centuria Property Funds Limited (Centuria) (ABN 11 086 553 639, AFSL 231 149), a wholly-owned subsidiary of Centuria Capital Group (ASX: CNI), as Responsible Entity for the Centuria Diversified Property Fund (ARSN 611 510 699). The information in this article is general information only and does not take into account the financial circumstances, needs or objectives of any person. Centuria is the responsible entity of a number of listed and unlisted property funds, each of which are issued under a product disclosure statement (PDS) that is available on Centuria's website centuria.com.au for all funds open for investment. An investment in any of Centuria's property funds carries risks associated with an investment in direct property including the loss of income and capital invested. The risks relating to an investment are detailed in each Fund's PDS and Centuria strongly recommends that the PDS be downloaded and read before any investment decision is made. Centuria receives fees from investments in its property funds. Past performance is not a reliable indicator of future performance.


text:
\section{Introduction}

With the vast amount of reviews emerging on platforms like Amazon and Yelp, aspect-based sentiment analysis, which extracts opinions about certain facets of entities from text, becomes increasingly essential and benefits a wide range of downstream applications~\cite{Bauman2017AspectBR, Nguyen2015SentimentAO}.

Aspect-based sentiment analysis contains two sub-tasks: Aspect extraction and sentiment polarity classification.
The former identifies the aspect covered in the review, whereas the latter decides its sentiment polarity.

\begin{figure}[t]
\centering
\includegraphics[width=1\linewidth]{figure/example.pdf}
\caption{
Two sample restaurant reviews. Pure aspect words are in red and wavy-underlined, and general opinion words are in blue and framed in boxes. Words implying both aspects and opinions (which we define as joint topics) are underlined and in purple.
}
\label{fig:exp}
\vspace{-0.5cm}
\end{figure}

Various methods have been proposed for the task.
Neural network models~\cite{Liu2015FinegrainedOM, Xu2018DoubleEA} have outperformed rule-based models~\cite{Hu2004MiningAS, Zhuang2006MovieRM}, but they require large-scale fine-grained labeled data to train, which can be difficult to obtain.
Some other studies leverage word embeddings to solve the aspect extraction problem in an unsupervised~\cite{He2017AnUN, Liao2019CouplingGA} or weakly-supervised setting~\cite{Angelidis2018SummarizingOA, Karamanolakis2019LeveragingJA}, \textit{without} using any annotated documents.
In this work, we study the weakly-supervised setting, where only a few keywords are provided for each aspect and sentiment.

We show two sample restaurant reviews in Fig.~\ref{fig:exp} together with their expected output---aspect and sentiment labels.
With a closer look at these two example reviews, we observe that S2 includes a general opinion word ``good'' and a pure aspect word ``seafood'', which are separate hints for sentiment and aspect classification respectively.
S1, on the other hand, does not address the target with plain and general words, but instead use more specific words like ``semi-private'' and ``date'' which are uniquely used when people feel good about the ambience instead of other aspects.
Humans can interpret these unique and fine-grained terms as hints for a joint topic of $\mbox{$\langle$}$good, ambience$\mbox{$\rangle$}$, but this is hard for models that are solely trained for one sub-task.
If a model can automatically learn the semantics of each joint topic of $\mbox{$\langle$}$sentiment, aspect$\mbox{$\rangle$}$, it will be able to identify representative terms of the joint topics such as  ``semi-private'' which provide information for aspect and sentiment simultaneously,
and will consequently benefit both aspect extraction and sentiment classification.
Therefore, leveraging more fine-grained information by coupling the two subtasks will enhance both.

Several LDA-based methods consider learning joint topics~\cite{Zhao2010JointlyMA, Wang2015SentimentAspectEB, Xu2012TowardsJE}, but they rely on external resources such as part-of-speech (POS) tagging or opinion word lexicons. A recent LDA-based model~\cite{GarcaPablos2018W2VLDAAU} uses pre-trained word embedding to bias the prior in topic models to jointly model aspect words and opinion words. Though working fairly well, topic models are generative models and do not enforce topic distinctiveness---topic-word distribution can largely overlap among different topics, allowing topics to resemble each other. Besides, topic models yield unstable results, causing large variance in classification results.

We propose the \textbf{JASen}\xspace model for \textbf{J}oint \textbf{A}spect-\textbf{Sen}timent Topic Embedding.
Our general idea is to learn a joint topic representation for each $\mbox{$\langle$}$sentiment, aspect$\mbox{$\rangle$}$ pair in the shared embedding space with words so that the surrounding words of topic embeddings nicely describe the semantics of a joint topic.
This is accomplished by training topic embeddings and word embeddings on in-domain corpora and modeling the joint distribution of user-given keywords on all the joint topics.
After learning the joint topic vectors, embedding-based predictions can be derived for any unlabeled review.
However, these predictions are sub-optimal for sentiment analysis where word order plays an important role.
To leverage the expressive power of neural models, we distill the knowledge from embedding-based predictions to convolutional neural networks (CNNs)~\cite{Krizhevsky2012ImageNetCW}
which perform compositional operations upon local sequences.
A self-training process is then conducted to refine CNNs by using their high-confident predictions on unlabeled data.

We demonstrate the effectiveness of \textbf{JASen}\xspace by conducting experiments on two benchmark datasets and show that our model outperforms all the baseline methods by a large margin. We also show that our model is able to describe joint topics with coherent term clusters.

Our contributions can be summarized as follows:
(1) We propose a weakly-supervised method \textbf{JASen}\xspace to enhance two sub-tasks of aspect-based sentiment analysis. Our method does \textit{not} need any annotated data but only a few keywords for each aspect/sentiment.
(2) We introduce an embedding learning objective that is able to capture the semantics of fine-grained joint topics of $\mbox{$\langle$}$sentiment, aspect$\mbox{$\rangle$}$ in the word embedding space. The embedding-based prediction is effectively leveraged by neural models to generalize on unlabeled data via self-training.
(3) We demonstrate that \textbf{JASen}\xspace generates high-quality joint topics and outperforms baselines significantly on two benchmark datasets.

\section{Related Work}
The problem of aspect-based sentiment analysis can be decomposed into two sub-tasks: aspect extraction and sentiment polarity classification. Most previous studies deal with them individually. There are various related efforts on aspect extraction \cite{He2017AnUN}, which can be followed by  sentiment classification models \cite{He2018ExploitingDK}. Other methods \cite{GarcaPablos2018W2VLDAAU} jointly solve these two sub-tasks by first separating target words from opinion words and then learning joint topic distributions over words.
Below we first review relevant work on aspect extraction (Sec \ref{sec:rel_AE}) and then turn to studies that jointly extract aspects and sentiment polarity (Sec \ref{sec:rel_Joint}).

\subsection{Aspect Extraction}\label{sec:rel_AE}
Early studies towards aspect extraction are mainly based on manually defined rules \cite{Hu2004MiningAS, Zhuang2006MovieRM}, which have been outperformed by supervised neural approaches that do not need labor-intensive feature engineering. While CNN \cite{Xu2018DoubleEA} and RNN \cite{Liu2015FinegrainedOM} based models have shown the powerful expressiveness of neural models, they can easily consume thousands of labeled documents thus suffer from the label scarcity bottleneck.

Various unsupervised approaches are proposed to model different aspects automatically. LDA-based methods \cite{Brody2010AnUA,Chen2014AspectEW} model each document as a mixture of aspects (topics) and output a word distribution for each aspect. Recently, neural models have shown to extract more coherent topics. ABAE~\cite{He2017AnUN} uses an autoencoder to reconstruct sentences through aspect embedding and removes irrelevant words through attention mechanisms.
CAt~\cite{Tulkens2020EmbarrassinglySU} introduces a single head attention calculated by a Radial Basis Function (RBF) kernel to be the sentence summary. The unsupervised nature of these algorithms is hindered by the fact that the learned aspects often do not well align with user's interested aspects, and additional human effort is needed to map topics to certain aspects, not to mention some topics are irrelevant of interested aspects.

Several weakly-supervised methods address this problem by using a few keywords per aspect as supervision to guide the learning process. MATE~\cite{Angelidis2018SummarizingOA} extends ABAE by initializing aspect embedding using weighted average of keyword embeddings from each aspect. ISWD~\cite{Karamanolakis2019LeveragingJA} co-trains a bag-of-word classifier and an embedding-based neural classifier to generalize the keyword supervision. Other text classification methods leverage pre-trained language model \cite{Meng2020Lotclass} to learn the semantics of label names or metadata \cite{Zhang2020MinimallySC} to propagate document labels.

The above methods do not take aspect-specific opinion words into consideration. The semantic meaning captured by a $\mbox{$\langle$}$sentiment, aspect$\mbox{$\rangle$}$ joint topic preserves more fine-grained information to imply the aspect of a sentence and thus can be used to improve the performance of aspect extraction.

\subsection{Joint Extraction of Aspect and Sentiment}\label{sec:rel_Joint}
Most previous studies that jointly perform aspect and sentiment extraction are LDA-based methods. \citet{Zhao2010JointlyMA} include aspect-specific opinion models along with aspect models in the generative process. \citet{Wang2015SentimentAspectEB} propose a restricted Boltzmann machine-based model that treats aspect and sentiment as heterogeneous hidden units. \citet{Xu2012TowardsJE} adapt LDA by introducing sentiment-related variables and integrating sentiment prior knowledge. All these methods rely on external resources such as part-of-speech (POS) tagging or opinion word lexicons. A more recent study that shares similar weakly-supervised setting with ours is W2VLDA \cite{GarcaPablos2018W2VLDAAU}. They apply Brown clustering \cite{Brown1992ClassBasedNM} to separate aspect-terms from opinion-terms and construct biased hyperparameters \textbf{$\alpha$} and \textbf{$\beta$} by embedding similarity.
Despite the effectiveness of topic models, they suffer from the drawback of not imposing discriminative constraints among topics---topic-word distribution can largely overlap among different topics, allowing redundant topics to appear and making it hard to classify them. We empirically show the advances of our method by capturing discriminative joint topic representations in the embedding space.
\section{Problem Definition}

Our weakly-supervised aspect-based sentiment analysis task is defined as follows.
The input is a training corpus $\mathcal{D}=\{d_1,d_2,\ldots,d_{|\mathcal{D}|}\}$ of text reviews from a certain domain (e.g., restaurant or laptop) \textit{without} any label for aspects or sentiment. A list of keywords $l_a$ for each aspect topic (denoted as $a \in A$) and $l_s$ for each sentiment polarity (denoted as $s \in S$) are provided by users as guidance. For each unseen review in the same domain, our model outputs a set of $\mbox{$\langle$}$$s$, $a$$\mbox{$\rangle$}$ labels.

\section{Model}
\begin{figure*}[t]
\centering
\includegraphics[width=0.98\linewidth]{figure/model-overview.pdf}
\caption{Overview of our model \textbf{JASen}\xspace. We first leverage the in-domain training corpus and user-given keywords to learn joint topic representation in the word embedding space. The marginal probability of keywords belonging to an aspect/sentiment can be summed up by the joint distribtution over $\mbox{$\langle$}$sentiment, aspect$\mbox{$\rangle$}$ joint topics. Embedding-based prediction on unlabeled data are then leveraged by neural models for pre-training and self-training.
}
\label{fig:workflow}
\vspace{-0.3cm}
\end{figure*}

\begin{figure}[t]
\centering
\includegraphics[width=1.0\linewidth]{figure/embedding.pdf}
\caption{Embedding training.
}
\label{fig:emb}
\vspace{-0.3cm}
\end{figure}

Figure~\ref{fig:workflow} shows the workflow of \textbf{JASen}\xspace.
Our goal is to generate a set of $\mbox{$\langle$}$sentiment, aspect$\mbox{$\rangle$}$ predictions for each review.

We first learn an embedding space to explicitly represent the semantics of the topics (including both pure aspect/sentiment and joint $\mbox{$\langle$}$sentiment, aspect$\mbox{$\rangle$}$ ones) as embedding vectors, which are surrounded by the embeddings of the representative words of the topics. We also impose discriminative regularization on the embedding space to push different topics apart. To model the local sequential information which is crucial for sentiment analysis, we use CNN as the classifier by pre-training it on pseudo labels given by the cosine similarity between document embeddings and topic embeddings, and self-training it on unlabeled data to iteratively refine its parameters. Below we introduce the details of \textbf{JASen}\xspace.

\subsection{Joint-Topic Representation Learning}
We learn the representations of words and topics on the in-domain corpus by following two principles: (1) distributional hypothesis~\cite{Sahlgren2008TheDH} and (2) topic distinctiveness. The first principle is achieved by an adaptation of the Skip-Gram model~\cite{Mikolov2013DistributedRO} through modeling both local and global contexts of words, and the second is achieved by a series of regularization objectives.
Fig.~\ref{fig:emb} provides the overview of our embedding learning objectives with an example.

\paragraph{Modeling Local and Global Contexts.}
We learn word embeddings based on the assumption that words with similar contexts have similar meanings, and define contexts to be a combination of location contexts~\cite{Mikolov2013DistributedRO} and global contexts~\cite{Meng2019SphericalTE, Liao2019CouplingGA,Meng2020DiscriminativeTM}.
The local context of a word $w_i$ refers to other words whose distances are $h$ words or less from $w_i$. To maximize the probability of seeing the local context of a word $w_i$, we use the following objective:
\begin{equation}
\label{eq:local}
\mathcal{L}_l = - \sum_{w_i} \sum_{0 < |j-i| \leq h} \log P(w_j|w_i),
\end{equation}
where $P(w_j|w_i) \propto \exp(\boldsymbol{v}_j^\top \boldsymbol{u}_i)$, and $\boldsymbol{u}_i, \boldsymbol{v}_j$ are the center and context word embeddings.

The global context~\cite{Meng2019SphericalTE, Liao2019CouplingGA} of a word $w_i$ refers to the document $d$ where a word appears, based on the motivation that similar documents contain similar-meaning words. We use the following objective for global context:
\begin{equation}
\label{eq:global}
\mathcal{L}_g = - \sum_{d\in \mathcal{D}} \sum_{w_i\in d} \log P(d|w_i),
\end{equation}
where $P(d|w_i) \propto \exp(\boldsymbol{d}^\top \boldsymbol{u}_i)$.

\paragraph{Regularizing Pure Aspect/Sentiment Topics.}
To endow the embedding space with discriminative power over the aspect/sentiment categories for better classification performance, we regularize the aspect topic embeddings $\boldsymbol{t}_a$ and sentiment topic embeddings $\boldsymbol{t}_s$ so that different topics are pushed apart.
For example, the word ``good'' in Fig.~\ref{fig:emb} is a keyword for the sentiment topic \textit{good}, and we aim to place $\boldsymbol{t}_{\text{good}}$ close to the word embedding of ``good'' in the embedding space while away from other topic embeddings (\emph{i.e.}, $\boldsymbol{t}_{\text{bad}}$).
To achieve this, we maximize the probability of using each topic keyword to predict its representing topic:
\begin{align}
\label{eq:reg_a}
\mathcal{L}_{reg}^A &= -\sum_{a \in A} \sum_{w_i \in l_a} \log P(t_{a} | w_i),\\
\label{eq:reg_s}
\mathcal{L}_{reg}^S &= -\sum_{s \in S} \sum_{w_i \in l_s} \log P(t_{s} | w_i),
\end{align}
where $l_a$, $l_s$ are the keyword lists for aspect $a$ and sentiment $s$, respectively; $P(t|w_i) \propto \exp (\boldsymbol{u}_i^\top \boldsymbol{t})$.
Eqs.~\eqref{eq:reg_a} and \eqref{eq:reg_s} empower the embedding space for classification purpose, that is, words can be ``classified'' into topics based on embedding similarity.
For good initializations of $\boldsymbol{t}_a$ and $\boldsymbol{t}_s$, we use the average word embedding of user-provided keywords for each aspect and sentiment.

\paragraph{Regularizing Joint $\mbox{$\langle$}$Sentiment, Aspect$\mbox{$\rangle$}$ Topics.}
Now we examine the joint case, where $|S| \times |A|$ topics are regularized.
We connect the learning of joint topic embeddings with pure aspect/sentiment topics by exploring the relationship between marginal distribution and joint distribution:
\begin{align}
\label{eq:marginal_a}
P(t_{a} | w_i) &= \sum_{s\in S} P \left( t_{\mbox{$\langle$} s,a \mbox{$\rangle$}} \Big| w_i\right),\\
\label{eq:marginal_s}
P(t_{s} | w_i) &= \sum_{a\in A} P \left( t_{\mbox{$\langle$} s,a \mbox{$\rangle$}} \Big| w_i\right).
\end{align}
As an example,
Fig.~\ref{fig:emb} shows that the marginal probability of the keyword ``good'' belonging to the sentiment topic ``good'' is equal to the probability sum of it belonging to $\mbox{$\langle$}$good, food$\mbox{$\rangle$}$, $\mbox{$\langle$}$good, ambience$\mbox{$\rangle$}$ and $\mbox{$\langle$}$good, service$\mbox{$\rangle$}$.

The objective for regularizing joint topics $\mathcal{L}_{joint}$ can be derived by replacing $P(t_a|w_i)$ in Eq.~\eqref{eq:reg_a} with Eq.~\eqref{eq:marginal_a} and $P(t_s|w_i)$ in Eq.~\eqref{eq:reg_s} with Eq.~\eqref{eq:marginal_s}.

We also notice that general opinion words such as ``good'' (or pure aspect words such as ``seafood'') are equally irrelevant to the aspect (or sentiment) dimension, so we use a uniform distribution $\mathcal{U}$ to regularize their distribution over all the classes on the irrelevant dimension:
\begin{align}
\label{eq:cross}
\mathcal{L}_{cross}^A &= \sum_{s\in S} \sum_{w_i\in l_s} \text{KL} \left( \mathcal{U}, P(t_{a}|w_i) \right),\\
\mathcal{L}_{cross}^S &= \sum_{a\in A} \sum_{w_i\in l_a} \text{KL} \left( \mathcal{U}, P(t_{s}|w_i) \right).
\end{align}
Putting the above objectives altogether, our final embedding learning objective is:
\begin{equation}
\label{eq:emb}
\mathcal{L} = \mathcal{L}_l + \lambda_{g} \mathcal{L}_g + \lambda_{r} (\mathcal{L}_{reg} + \mathcal{L}_{joint} + \mathcal{L}_{cross}),
\end{equation}
where $\mathcal{L}_{reg} = \mathcal{L}_{reg}^A + \mathcal{L}_{reg}^S$, and the same for $\mathcal{L}_{joint}$ and $\mathcal{L}_{cross}$. For all the regularization terms, we treat them equally by using the same weight $\lambda_r$, which shows to be effective in practice.

\subsection{Training CNNs for Classification}

Word ordering information is crucial for sentiment analysis.
For example, ``Any movie is better than this one'' and ``this one is better than any movie'' convey opposite sentiment polarities but have the exactly same words.
The trained embedding space mainly captures word-level discriminative signals but is insufficient to model such sequential information.
Therefore, we propose to train convolutional neural networks (CNNs) to generalize knowledge from the preliminary predictions given by the embedding space.
Specifically, we first pre-train CNNs with soft predictions given by the cosine similarity between document embeddings and topic embeddings, and then adopt a self-training strategy to further refine the CNNs using their high-confident predictions on unlabeled documents.

\paragraph{Neural Model Pre-training.}
For each unlabeled review, we can (1) derive one distribution over the joint topics by calculating the cosine similarity between the document representation $\boldsymbol{d}$ and $\boldsymbol{t}_{\mbox{$\langle$} s,a \mbox{$\rangle$}}$, (2) derive separate distributions over sentiment and aspect variables using cosine similarity with marginal topics $\boldsymbol{t}_a$ and $\boldsymbol{t}_s$, or (3) combine (1) and (2) by adding the two sets of cosine scores.
We find empirically that the last method achieves the best result, \emph{i.e.}, the distribution of a test review $d$ over the aspect and sentiment categories is computed as:

{\small
\begin{align}
\label{eq:pre_score_a}
P(a|d) &\propto \exp \left( T \cdot \left(\cos(\boldsymbol{t}_a, \boldsymbol{d}) + \frac{\sum_{s\in S}\cos(\boldsymbol{t}_{\mbox{$\langle$} s,a \mbox{$\rangle$}}, \boldsymbol{d})}{|S|} \right) \right), \\
\label{eq:pre_score_s}
P(s|d) &\propto \exp \left(T \cdot \left(\cos(\boldsymbol{t}_s, \boldsymbol{d}) + \frac{\sum_{a\in A}\cos(\boldsymbol{t}_{\mbox{$\langle$} s,a \mbox{$\rangle$}}, \boldsymbol{d})}{|A|} \right) \right),
\end{align}}
\noindent
where $\boldsymbol{d}$ is obtained by averaging the word embeddings in $d$, and $T$ is the temperature to control how greedy we want to learn from the embedding-based prediction.

We train two CNN models separately for aspect and sentiment classification by learning from the two distributions in Eqs.~\eqref{eq:pre_score_a} and \eqref{eq:pre_score_s}. We leverage the knowledge distillation objective~\cite{Hinton2015DistillingTK} to minimize the cross entropy between the embedding-based prediction $p_d$ and the output prediction $q_d$ of the CNNs:
\begin{equation}
H(p_d,q_d) = - \sum_{t} P(t|d) \log Q(t|d).
\end{equation}

\paragraph{Neural Model Refinement.}
The pre-trained CNNs only copy the knowledge from the embedding space.
To generalize their current knowledge to the unlabeled corpus, we adopt a self-training technique to bootstrap the CNNs.
The idea of self-training is to use the model's high-confident predictions on unlabeled samples to refine itself.
Specifically, we compute a target score~\cite{Xie2016UnsupervisedDE} for each unlabeled document based on the predictions of the current model by enhancing high-confident predictions via a squaring operation:
$$\text{target}(P(a|d)) = \frac{P(a|d)^2/f_a}{\sum_{a'\in A}P(a'|d)^2/f_{a'}},$$
where $f_{a}=\sum_{d\in \mathcal{D}} P(a|d)$. Since self-training updates the target scores at each epoch, the model is gradually refined by its most recent high-confident predictions. The self-training process is terminated when no more samples change label assignments after the target scores are updated. The resulting model can be used to classify any unseen reviews.
\section{Evaluation}

We conduct a series of quantitative and qualitative evaluation on benchmark datasets to demonstrate the effectiveness of our model.

\begin{table}
\centering
\scalebox{0.8}{
\begin{tabular}{|c|c|c|}
\hline
Dataset & \#Training reviews & \#Test reviews\\
\hline
\textbf{Restaurant} & 17,027 & 643\\
\hline
\textbf{Laptop} & 14,683 & 307\\
\hline
\end{tabular}
}\caption{Dataset Statistics.}\label{tab:dataset}
\end{table}

\begin{table}
\centering

\scalebox{0.8}{
\begin{tabular}{|c|c|c|}
\hline
Dataset & Aspect & Keywords\\
\hline
\multirow{5}{*}{\makecell{ \textbf{Restaurant}}} & Location
& \makecell{street block river avenue}\\
\cline{2-3}
& Drinks
& \makecell{beverage wines cocktail sake}\\
\cline{2-3}
& Food
& \makecell{spicy sushi pizza taste}\\
\cline{2-3}
& Ambience
& \makecell{atmosphere room \\ seating environment}\\
\cline{2-3}
& Service
& \makecell{tips manager waitress servers}\\
\hline
\multirow{8}{*}{\makecell{\textbf{Laptop}}}
& Support
& \makecell{service warranty\\ coverage replace}\\
\cline{2-3}
& OS
& \makecell{windows ios mac system}\\
\cline{2-3}
& Display
& \makecell{screen led monitor resolution}\\
\cline{2-3}
& Battery
& \makecell{life charge last power}\\
\cline{2-3}
& Company
& \makecell{hp toshiba dell lenovo}\\
\cline{2-3}
& Mouse
& \makecell{touch track button pad}\\
\cline{2-3}
& Software
& \makecell{programs apps itunes photoshop}\\
\cline{2-3}
& Keyboard
& \makecell{key space type keys} \\
\hline
\end{tabular}

}\caption{Keywords of each aspect.}\label{tab:keyword}
\vspace{-0.3cm}
\end{table}

\subsection{Experimental Setup}
\smallskip
\noindent \textbf{Datasets:} The following two datasets are used for evaluation:
\begin{itemize}[leftmargin=*]
\parskip -0.2ex
    \item \textbf{Restaurant}: For in-domain training corpus, we collect 17,027 unlabeled reviews from \textit{Yelp Dataset Challenge}\footnote{https://www.yelp.com/dataset/challenge}. For evaluation, we use the benchmark dataset in the restaurant domain in SemEval-2016 \cite{pontiki-etal-2016-semeval} and SemEval-2015 \cite{Pontiki2015SemEval2015T1}, where each sentence is labeled with aspect and sentiment polarity. We remove sentences with multiple labels or with a \textit{neutral} sentiment polarity to simplify the problem (otherwise a set of keywords can be added to describe it).

    \item \textbf{Laptop}: We leverage 14,683 unlabeled Amazon reviews under the laptop category collected by~\cite{He2016UpsAD} as in-domain training corpus. We also use the benchmark dataset in the laptop domain in SemEval-2016 and SemEval-2015 for evaluation.

    Detailed statistics of both datasets are listed in Table \ref{tab:dataset}, and the aspects along with their keywords are in Table \ref{tab:keyword}.
\end{itemize}

\vspace{-0.2cm}
\smallskip
\noindent \textbf{Preprocessing and Hyperparameter Setting.}
To preprocess the training corpus $D$, we use the word tokenizer provided by \textit{NLTK}\footnote{https://www.nltk.org/}. We also use a phrase mining tool, AutoPhrase \cite{Shang2017AutomatedPM}, to extract meaningful phrases such as ``great wine'' and ``numeric keypad'' such that they can capture complicated semantics in a single text unit. We use the benchmark validation set to fine-tune the hyperparameters: embedding dimension = $100$, local context window size $h=5$, $\lambda_g = 2.5$, $\lambda_r = 1$, training epoch = $5$. For neural model pre-training, we set $T = 20$. A CNN model is trained for each sub-task: aspect extraction and sentiment classification. Each model uses 20 feature maps for filters with window sizes of 2, 3, and 4. SGD is used with $1e-3$ as the learning rate in both pre-training and self-training and the batch size is set to 16.

\begin{table*}[ht]
	\centering
	\small

	\scalebox{0.9}{
		\begin{tabular}{c|cccc|cccc}
			\toprule
			\multirow{2}{*}{Methods} &
			\multicolumn{4}{c|}{\textbf{Restaurant}} & \multicolumn{4}{c}{\textbf{Laptop}} \\
			& Accuracy & Precision & Recall & macro-F1
			& Accuracy & Precision & Recall & macro-F1 \\
			\midrule
			CosSim
			& 61.43 & 50.12 & 50.26 & 42.31
			& 53.84 & 58.79 & 54.64 & 52.18\\
			ABAE\cite{He2017AnUN}
			& 67.34 & 46.63 & 50.79 & 45.31
			& 59.84 & 59.96 & 59.60 & 56.21\\
			CAt\cite{Tulkens2020EmbarrassinglySU}
			& 66.30 & 49.20 & 50.61 & 46.18
			& 57.95 & 65.23 & 59.91 & 58.64 \\
			W2VLDA\cite{GarcaPablos2018W2VLDAAU}
			& 70.75 & 58.82 & 57.44 & 51.40
			& 64.94 & 67.78 & 65.79 & 63.44 \\
			BERT\cite{Devlin2019BERTPO}
			& 72.98 & 58.20 & \textbf{74.63} & 55.72
			& 67.52 & 68.26 & 67.29 & 65.45 \\
			\textbf{JASen}\xspace w/o joint & 81.03 & 61.66 & 65.91 & 61.43& 69.71 & 69.13 & 70.65 & 67.49 \\
            \textbf{JASen}\xspace w/o self train
			& 82.90 & 63.15 & 72.51 & 64.94
			& 70.36 & 68.77 & 70.91 & 68.79  \\
			\textbf{JASen}\xspace
			& \textbf{83.83} & \textbf{64.73} & 72.95 & \textbf{66.28}
			& \textbf{71.01} & \textbf{69.55} & \textbf{71.31} & \textbf{69.69}  \\
			\bottomrule
		\end{tabular}

	}\caption{Quantitative evaluation on aspect identification (\%).}\label{tab:aspect}
\end{table*}

\begin{table*}[ht]
	\centering
	\small
	\scalebox{1.0}{
		\begin{tabular}{c|cccc|cccc}
			\toprule
			\multirow{2}{*}{Methods} &
			\multicolumn{4}{c|}{\textbf{Restaurant}} & \multicolumn{4}{c}{\textbf{Laptop}} \\
			& Accuracy & Precision & Recall & macro-F1
			& Accuracy & Precision & Recall & macro-F1 \\
			\midrule
			CosSim
			& 70.14 & 74.72 & 61.26 & 59.89
			& 68.73 & 69.91 & 68.95 & 68.41\\
			W2VLDA
			& 74.32 & 75.66 & 70.52 & 67.23
			& 71.06 & 71.62 & 71.37 & 71.22 \\
			BERT
			& 77.48 & 77.62 & 73.95 & 73.82
			& 69.71 & 70.10 & 70.26 & 70.08 \\
            \textbf{JASen}\xspace w/o joint & 78.07 & 80.60 & 72.40 & 73.71 & 72.31 & 72.34 & 72.25 & 72.26\\
            \textbf{JASen}\xspace w/o self train
			& 79.16 & 81.31 & 73.94 & 75.34
			& 73.29 & 73.69 & 73.42 & 73.24  \\
			\textbf{JASen}\xspace
			& \textbf{81.96} & \textbf{82.85} & \textbf{78.11} & \textbf{79.44}
			& \textbf{74.59} & \textbf{74.69} & \textbf{74.65} & \textbf{74.59}  \\
			\bottomrule
		\end{tabular}

	}\caption{Quantitative evaluation on sentiment polarity classification (\%).}\label{tab:senti}
\end{table*}

\subsection{Quantitative Evaluation}
We conduct quantitative evaluation on both aspect extraction and sentiment polarity classification.

\smallskip
\noindent \textbf{Compared Methods.}
Our model is compared with several previous studies. A few of them are specifically designed for aspect extraction but do not perform well on sentiment classification. So we only report their results on aspect extraction. For fair comparison, we use the same training corpus and test set for each baseline method. For weakly-supervised methods, they are fed with the same keyword list as ours.
\begin{itemize}[leftmargin=*]
\parskip -0.2ex
    \item \textbf{CosSim}: The topic representation is averaged by the embedding of seed words trained by Word2Vec on training corpus. Cosine similarity is computed between a test sample and the topics to classify the sentence.
    \item \textbf{ABAE} \cite{He2017AnUN}: An attention-based model to unsupervisedly extract aspects. An autoencoder is trained to reconstruct sentences through aspect embeddings. The learned topics need to be manually mapped to aspects.
    \item \textbf{CAt} \cite{Tulkens2020EmbarrassinglySU}: A recent method for unsupervised aspect extraction. A single head attention is calculated by a Radio Basis Function kernel to be the sentence summary.

    \item \textbf{W2VLDA} \cite{GarcaPablos2018W2VLDAAU}: A state-of-the-art topic modeling based method that leverages keywords for each aspect/sentiment to jointly do aspect/sentiment classification.
    \item \textbf{BERT} \cite{Devlin2019BERTPO}: A recent proposed deep language model. We utilize the pre-trained BERT (12-layer, 768 dimension, uncased) and implement a simple weakly-supervised method that fine-tunes the model by providing pseudo labels for sentences containing keywords from a given aspect/sentiment.
    \item \textbf{\textbf{JASen}\xspace w/o joint}: An ablation of our proposed model. Neural model is pre-trained on separate topic embedding for each sentiment and aspect.
    \item \textbf{\textbf{JASen}\xspace w/o self train}: An ablation of our proposed model without self-training process.
\end{itemize}

\begin{table*}[ht]
\centering
	\small

	\scalebox{0.9}{
	\begin{tabular}{|c|c|c|c|c|c|c|}
	\hline
	& Ambience & Service & Food & Support & Keyboard & Battery \\
	\hline
	Good
	& \makecell{cozy,\\intimate,\\comfortable,\\loungy,\\ great music}
	& \makecell{professional,\\ polite,\\knowledgable,\\informative,\\helpful}
	& \makecell{huge portion,\\flavourful,\\super fresh,\\ husband loves,\\authentic italian}
	& \makecell{accidental damage\\protection,
	accidental\\damage warranty,
	generous,\\guarantee,\\commitment}
	& \makecell{tactile feedback,\\tactile feel,\\ classic,\\nicely spaced,\\chiclet style}
	& \makecell{lasts long,\\charges quickly,\\high performance,\\lasting,\\great power}
	\\
	\hline
	Bad
	& \makecell{cramped,\\unbearable,\\uncomfortable,\\dreary, chaos}
	& \makecell{inattentive,\\ignoring,\\extremely rude,\\condescending,\\inexperienced}
	& \makecell{microwaved,\\flavorless,\\vomit,\\frozen food,\\undercooked}
	& \makecell{completely useless,\\denied,\\refused,\\blamed,\\apologize}
	& \makecell{large hands,\\shallow,\\cramped,\\wrong key,\\typos}
	& \makecell{completely dead,\\drained,\\ discharge,\\unplugged,\\torture}
	\\
	\hline
	\end{tabular}}
		\caption{Keywords retrieved by joint topic representations.}\label{tab:qual}
\end{table*}

\smallskip
\noindent \textbf{Aspect Extraction.}~
We report the results of aspect extraction of our model and all the baselines in Table \ref{tab:aspect}. We use four metrics for evaluation: Accuracy, Precision, Recall and macro-F1 score.
We observe that weakly-supervised methods tend to have a better performance than unsupervised ones, suggesting that using keywords to enrich the semantics of labels is a promising direction to increase classification performance.
As shown in Table \ref{tab:aspect}, our model, even without self-training, outperforms baseline methods on most of the metrics by a large margin, indicating that \textbf{JASen}\xspace obtains substantial benefits from learning the semantics of fine-grained joint topics, and self-training boosts the performance further.
We observe that \textbf{JASen}\xspace can deal with cases where the target of the sentence is not explicitly mentioned.
For example, \textbf{JASen}\xspace correctly labels ``It's to die for!'' as (good, food). Although nothing mentioned is related to food, ``to die for'' appears in other sentences addressing the tastiness of food, thus is captured by the joint topic of (good, food).

\smallskip
\noindent \textbf{Sentiment Polarity Classification.}~
We compare \textbf{JASen}\xspace against baseline methods on sentiment classification and show the results in Table \ref{tab:senti}. Since some methods are designed for aspect extraction and do not perform well on sentiment classification, we do not report their results.
As shown in the table, \textbf{JASen}\xspace outperforms all the baselines on both datasets.
We also observe that methods only leveraging local contexts do not perform well compared to methods that leverage both global and local contexts on \textbf{Laptop} dataset. Since ``good'' and ``bad'' are a pair of antonyms, they can have very similar collocations, so models purely capturing local contexts do not distinguish them well.

\subsection{Qualitative Evaluation}

To evaluate the quality of the joint topic representation, we retrieve their representative terms by ranking the embedding cosine similarity between words and
each joint topic vector. For brevity, we randomly sample 3 aspects from each dataset and pair them up with the two sentiment polarity to form 12 joint topics. We list their top terms in Table \ref{tab:qual}.
Results show that the representative terms form coherent and meaningful topics, and they are not restricted to be adjectives, such as ``vomit'' in (bad, food) and ``commitment'' in (good, support). Another interesting observation is that ``cramped'' appears in both (bad, ambience) in restaurant domain and (bad, keyboard) in laptop domain, suggesting that \textbf{JASen}\xspace captures different meanings of words based on in-domain corpus.

\begin{figure}[ht]
\centering
\includegraphics[width=1\linewidth]{figure/hyperparameter.pdf}
\caption{Macro-F1 score vs. keyword number.}
\label{fig:kw}
\end{figure}

\subsection{Effect of Number of Keywords}
We study the effect of the number of keywords. In Figure \ref{fig:kw} we show the macro-F1 score of aspect extraction using different number of keywords for each aspect on \textbf{Laptop} dataset. The trend clearly shows the model performance increases when more keywords are provided. Moreover, when only one keyword is provided (only the label name), \textbf{JASen}\xspace still has a stable performance and a large gap over the ablation without learning joint topic embedding, implying that learning joint topic semantics is especially powerful in low resource setting.

\begin{figure}[ht]
\centering
\includegraphics[width=1\linewidth]{figure/yelp_topics_pca1.pdf}
\caption{Visualization of joint topics (purple stars), aspect topics (red crosses) and sentiment topics (blue dots) in the embedding space.}
\label{fig:vis}
\end{figure}

\subsection{Joint Topic Representation Visualization}
To understand how the joint topics are distributed in the embedding space, along with the aspect and sentiment topics, we use PCA~\cite{Jolliffe2011PrincipalCA} for dimension reduction to visualize topic embedding trained on the \textbf{Restaurant} corpus in Fig.\ \ref{fig:vis}. An interesting observation is that, some aspect topics (e.g., \textit{ambience}) lie approximately in the middle of their joint topics (``\textit{good, ambience}'' and ``\textit{bad, ambience}''), showing that our embedding learning objective understands the joint topics as decomposition of their ``marginal'' topics, which fits with our goal to learn fine-grained topics.

\begin{table*}[ht]
\centering
	\small
	\scalebox{0.9}{
	\begin{tabular}{|c|c|c|c|}
	\hline
	 Review & Ground Truth & \makecell{Output of\\ Full Model} & \makecell{Output of Model\\ w/o joint embedding} \\
	\hline
	\makecell{
	The wait staff is very freindly, they make it\\
	feel like you're eating in a freindly little\\ european town.}
	& (good, service) & (good, ambience) & (good, location)\\
	\hline
	\makecell{
	The outdoor atmosphere of sitting on the sidewalk\\ watching the world go by 50 feet away on 6th \\
	avenue on a cool evening was wonderful.
	}
	& (good, location) & (good, ambience) & (good, ambience)\\
	\hline
	\makecell{
	It's simply the best meal in NYC.}
	& (good, food) & (good, food) & (good, location)\\
	\hline
	\makecell{
	You can get a table without a reservation if you\\ get there early I they don't make you by bottles.}
	& (good, service) & (good, service) & (bad, service)\\
	\hline
	\makecell{
	The sauce tasted more like Chinese fast food than\\ decent Korean.}
	& (bad, food) & (good, food) & (bad, food)\\
	\hline
	\makecell{
	My wife had barely\#\#\#touched that mess of a dish.}
	& (bad, food) & (bad, food) & (good, food)\\
	\hline
	\makecell{
	This is undoubtedly my favorite modern Japanese\\ brasserie (that don't serve sushi), and in my\\ opinion, one of the most romantic restaurants in\\ the city!}
	& (good, ambience) & (good, food) & (good, location)
	\\
	\hline
	\makecell{
	We took advanatage of the half price sushi deal\\
	on saturday so it was well worth it.}
	& (good, food) & (good, food) & (bad, food) \\
	\hline
	\makecell{
	If you don't like it, I don't know what to tell you.}
	& (good, food) & (bad, food) & (bad, service)\\
	\hline

	\end{tabular}}
		\caption{Comparison of predictions on sample \textbf{Restaurant} reviews between our full model and model pre-trained w/o joint topic embedding. }\label{tab:cas_rest}
\end{table*}

\begin{table*}[h]
\centering
	\small
	\scalebox{0.9}{
	\begin{tabular}{|c|c|c|c|}
	\hline
	 Review & Ground Truth & \makecell{Output of\\ Full Model} & \makecell{Output of Model\\ w/o joint embedding} \\
	\hline
	\makecell{
	NO junkware!!}
	& (good, software) & (good, software) & (good, display) \\
	\hline
	\makecell{
	 I definitely will buy a Mac again if and when this\\ computer ever fails.}
	& (good, company) & (good, os) & (good, os) \\
	\hline
	\makecell{
	I don't have the inclination or time to devote to a\\ companies tech support, search functions, or hold\\ times.....dropped the HP and never looked back.}
	& (bad, company) & (bad, support) & (bad, company)\\
	\hline
	\makecell{I find myself adjusting it regularly.}
	& (bad, display) & (bad, display) & (bad, mouse)\\
	\hline
	\makecell{
	I thought learning the Mac OS would be hard, but\\
	it is easily picked up if you are familiar with a PC.}
	& (good, os) & (good, os) & (bad, os) \\
	\hline
	\makecell{
	They told me to reprogram the computer, and I \\
	didn't need  to do that, and I lost pictures\\
	of my oldests first 2 years of her life.}
	& (bad, support) & (bad, support) & (good, support)\\
	\hline
	\makecell{But, hey, it's an Apple.}
	& (good, company) & (bad, company) & (good, company)\\
	\hline
	\makecell{
	I'm no power\#\#\#user, but I have had no\\
	learning\#\#\#curve with the MAC and I don't do\\
	anything geeky enough forcing me to learn the OS.}
	& (good, os) & (good, os) & (bad, os)\\
	\hline
	\makecell{
	The battery lasted 12 months, then pffft.....gone.}
	& (bad, battery) & (bad, battery) & (good, battery)\\
	\hline
	\end{tabular}}
		\caption{Comparison of predictions on sample \textbf{Laptop} reviews between our full model and model pre-trained w/o joint topic embedding.}\label{tab:cas_laptop}
\end{table*}

\subsection{Case Studies}
We list several test samples along with their ground truth and model predictions in Table \ref{tab:cas_rest} and Table \ref{tab:cas_laptop}.
Some conflicting cases between ours and the ground truth are rather ambiguous. For example, the ground truth of the second example in Table \ref{tab:cas_rest} is (good, location), but we still think given that the review mentions ``the outdoor atmosphere'' and uses terms like ``sitting on the sidewalk'' and ``cool evening'', it is more relevant to ambience than location, as is output by our full model.
The gold aspect label for the second and the third reviews in Table \ref{tab:cas_laptop} are both ``company'', but apparently these two sentences are talking about two different aspects: the product itself and the service of the company. Though the output of our model, ``os'' and ``support'' for these two sentences may not be the most precise prediction, at least our model treats them as two different aspects.

\section{Conclusion}
In this paper we propose to enhance weakly-supervised aspect-based sentiment analysis by learning the representation of $\mbox{$\langle$}$sentiment, aspect$\mbox{$\rangle$}$ joint topic in the embedding space to capture more fine-grained information.
We introduce an embedding learning objective that leverages user-given keywords for each aspect/sentiment and models their distribution over the joint topics.
The embedding-based predictions are then used for pre-training neural models, which are further refined via self-training on unlabeled corpus.
Experiments show that our method learns high-quality joint topics and outperforms previous studies substantially.

In the future, we plan to adapt our methods to more general applications that are not restricted to the field of sentiment analysis, such as doing multiple-dimension classification (e.g., topic, location) on general text corpus. Another promising direction is to leverage taxonomy construction algorithms \cite{Huang2020CoRelST} to capture more fine-grained aspects, such as ``smell'' and ``taste'' for ``food''.

\section{Case studies.}
\label{app:case}
We list several test samples along with their ground truth and model predictions in Table \ref{tab:cas_rest} and Table \ref{tab:cas_laptop}.
Some conflicting cases between ours and the ground truth are rather ambiguous. For example, the ground truth of the second example in Table \ref{tab:cas_rest} is (good, location), but we still think given that the review mentions ``the outdoor atmosphere'' and uses terms like ``sitting on the sidewalk'' and ``cool evening'', it is more relevant to ambience than location, as is output by our full model.
The gold aspect label for the second and the third reviews in Table \ref{tab:cas_laptop} are both ``company'', but apparently these two sentences are talking about two different aspects: the product itself and the service of the company. Though the output of our model, ``os'' and ``support'' for these two sentences may not be the most precise prediction, at least our model treats them as two different aspects.
For other difficult sentences, human may still have a more precise judgement with much more common knowledge then our model trained on a corpus with only thousands of reviews.

\begin{table*}[ht]
\centering
	\small
	\scalebox{0.9}{
	\begin{tabular}{|c|c|c|c|}
	\hline
	 Review & Ground Truth & \makecell{Output of\\ Full Model} & \makecell{Output of Model\\ w/o joint embedding} \\
	\hline
	\makecell{
	The wait staff is very freindly, they make it\\
	feel like you're eating in a freindly little\\ european town.}
	& (good, service) & (good, ambience) & (good, location)\\
	\hline
	\makecell{
	The outdoor atmosphere of sitting on the sidewalk\\ watching the world go by 50 feet away on 6th \\
	avenue on a cool evening was wonderful.
	}
	& (good, location) & (good, ambience) & (good, ambience)\\
	\hline
	\makecell{
	It's simply the best meal in NYC.}
	& (good, food) & (good, food) & (good, location)\\
	\hline
	\makecell{
	You can get a table without a reservation if you\\ get there early I they don't make you by bottles.}
	& (good, service) & (good, service) & (bad, service)\\
	\hline
	\makecell{
	The sauce tasted more like Chinese fast food than\\ decent Korean.}
	& (bad, food) & (good, food) & (bad, food)\\
	\hline
	\makecell{
	My wife had barely\#\#\#touched that mess of a dish.}
	& (bad, food) & (bad, food) & (good, food)\\
	\hline
	\makecell{
	This is undoubtedly my favorite modern Japanese\\ brasserie (that don't serve sushi), and in my\\ opinion, one of the most romantic restaurants in\\ the city!}
	& (good, ambience) & (good, food) & (good, location)
	\\
	\hline
	\makecell{
	We took advanatage of the half price sushi deal\\
	on saturday so it was well worth it.}
	& (good, food) & (good, food) & (bad, food) \\
	\hline
	\makecell{
	Somehow working the italian charm with constant\\
	mille grazie does not constitute proper service.}
	& (bad, service) & (good, service) & (bad, service) \\
	\hline
	\makecell{
	If you don't like it, I don't know what to tell you.}
	& (good, food) & (bad, food) & (bad, service)\\
	\hline

	\end{tabular}}
		\caption{Comparison of predictions on sample \textbf{Restaurant} reviews between our full model and model pre-trained w/o joint topic embedding. }\label{tab:cas_rest}
\end{table*}

\begin{table*}[ht]
\centering
	\small
	\scalebox{0.9}{
	\begin{tabular}{|c|c|c|c|}
	\hline
	 Review & Ground Truth & \makecell{Output of\\ Full Model} & \makecell{Output of Model\\ w/o joint embedding} \\
	\hline
	\makecell{
	NO junkware!!}
	& (good, software) & (good, software) & (good, display) \\
	\hline
	\makecell{
	 I definitely will buy a Mac again if and when this\\ computer ever fails.}
	& (good, company) & (good, os) & (good, os) \\
	\hline
	\makecell{
	I don't have the inclination or time to devote to a\\ companies tech support, search functions, or hold\\ times.....dropped the HP and never looked back.}
	& (bad, company) & (bad, support) & (bad, company)\\
	\hline
	\makecell{I find myself adjusting it regularly.}
	& (bad, display) & (bad, display) & (bad, mouse)\\
	\hline
	\makecell{
	I thought learning the Mac OS would be hard, but\\
	it is easily picked up if you are familiar with a PC.}
	& (good, os) & (good, os) & (bad, os) \\
	\hline
	\makecell{
	They told me to reprogram the computer, and I \\
	didn't need  to do that, and I lost pictures\\
	of my oldests first 2 years of her life.}
	& (bad, support) & (bad, support) & (good, support)\\
	\hline
	\makecell{
	It was nearly impossible to find a laptop that\\
	had A) a side keyboard.}
	& (good, keyboard) & (bad, keyboard) & (good, keyboard)\\
	\hline
	\makecell{But, hey, it's an Apple.}
	& (good, company) & (bad, company) & (good, company)\\
	\hline
	\makecell{
	I'm no power\#\#\#user, but I have had no\\
	learning\#\#\#curve with the MAC and I don't do\\
	anything geeky enough forcing me to learn the OS.}
	& (good, os) & (good, os) & (bad, os)\\
	\hline
	\makecell{
	The battery lasted 12 months, then pffft.....gone.}
	& (bad, battery) & (bad, battery) & (good, battery)\\
	\hline
	\end{tabular}}
		\caption{Comparison of predictions on sample \textbf{Laptop} reviews between our full model and model pre-trained w/o joint topic embedding.}\label{tab:cas_laptop}
\end{table*}

\section*{Acknowledgments}
Research was sponsored in part by US DARPA KAIROS Program No. FA8750-19-2-1004 and SocialSim Program No.  W911NF-17-C-0099, National Science Foundation IIS 16-18481, IIS 17-04532, and IIS 17-41317, and DTRA HDTRA11810026. Any opinions, findings, and conclusions or recommendations expressed herein are those of the authors and should not be interpreted as necessarily representing the views, either expressed or implied, of DARPA or the U.S. Government. The U.S. Government is authorized to reproduce and distribute reprints for government purposes notwithstanding any copyright annotation hereon.
We thank anonymous reviewers for valuable and insightful feedback.

\bibliographystyle{acl_natbib}

redpajama_set_name: RedPajamaArXiv


text:
KataGo is a free and open-source computer Go program, capable of defeating top-level human players. First released on 27 February 2019, it is developed by David Wu.

Based on techniques used by DeepMind's AlphaGo Zero, KataGo implements Monte Carlo tree search with a convolutional neural network providing position evaluation and policy guidance. Compared to AlphaGo, KataGo introduces many refinements that enable it to learn faster and play more strongly.
Notable features of KataGo that are absent in many other Go-playing programs include score estimation; support for small boards, arbitrary values of komi, and handicaps; and the ability to use various Go rulesets and adjust its play and evaluation for the small differences between them.

KataGo's first release was trained by David Wu using resources provided by his employer Jane Street Capital, but it is now trained by a distributed effort. Members of the computer Go community provide computing resources by running the client, which generates self-play games and rating games, and submits them to a server. The self-play games are used to train newer networks and the rating games to evaluate the networks' relative strengths.

KataGo supports the Go Text Protocol, with various extensions, thus making it compatible with popular GUIs such as Lizzie. As an alternative, it also implements a custom "analysis engine" protocol, which is used by the KaTrain GUI, among others. KataGo is widely used by strong human go players, including the South Korean national team, for training purposes. KataGo is also used as the default analysis engine in the online Go website AI Sensei, as well as OGS (the Online Go Server).

In 2022, KataGo was used as the target for adversarial attack research, designed to demonstrate the "surprising failure modes" of AI systems. The researchers were able to trick KataGo into ending the game prematurely.

References

External links
KataGo on GitHub
KataGo on Sensei's Library
KataGo Training website

Go engines
Free and open-source software
2019 software
Applied machine learning


The South Sydney Rabbitohs have gone down to the Wests Tigers by 30-14 tonight in Friday Night Football this evening at ANZ Stadium.
Playing in his 50th first grade game, Alex Johnston grabbed himself a try-scoring double while also setting up a second for Kirisome Auva'a.
An early penalty to the Tigers on Souths' own line invited Wests to have first crack, and after multiple repeat sets, Joshua Addo-Carr came within metres of scoring, only to drop the ball with the line wide open.
The Tigers again looked likely to score as the half-way mark of the opening stanza approached, with the side again coming within an inch of scoring through Mitchell Moses only for the five-eighth to knock on.
But Moses made no mistake just two minutes later when he crossed out wide to open the scoring for the evening courtesy of a vicious burst of acceleration close to the line to make it six nil. But the Tigers were only getting started.
From the very next kick-off, the Tigers took advantage of some slow Rabbitohs defence to slice straight through on the first tackle before racing the length of the field through Tim Simona to score. Moses converted to make it 10-0.
With the Tigers looking well in control, the Rabbitohs turned the tables owing to a defensive error from the black and golds, with winger Alex Johnston finishing off a movement to finally cross for Souths' first try of the evening out wide to make it 10-4.
With the first half coming to a close, a Rabbitohs line drop-out set up what would be Wests' third try of the evening, with the side showing immense ball-handling skills to keep it alive long enough to land in the hands in David Nofoaluma who scored to make it 14-4. The try would send the teams to the sheds with the Tigers leading by 10 points.
The Rabbitohs would be next to score, and it would again be Johnston – the Souths Junior's effort briefly being sent to The Bunker for examination before being awarded to take the scores to 14-8.
But the Tigers would hit back almost immediately when Chris Lawrence hit a short-ball at speed close to the line to score, before Kevin Naqaima also added his name to the score-sheet with a try of his own courtesy of some hard-running to make it 22-8.
Just two minutes later, Robbie Farah sliced through the Rabbitohs defence to streak some 50 metres to score right next to the posts. Moses added the extras to make it 28-8.
But Alex Johnston would again make his mark on the game for the Rabbitohs when an Adam Reynolds kick into the corner-post went over the touch-line, only for the Indigenous All Star and Test player to bat the ball back into the field of play for Auva'a to score. Reynolds converted from the touch-line to make it 28-14.
A final penalty-goal to the Tigers would take the final score out to 30-14.


text:
class PostAlerter

  def self.post_created(post)
    alerter = PostAlerter.new
    alerter.after_save_post(post, true)
    post
  end

  def not_allowed?(user, post)
    user.blank? ||
    user.id == Discourse::SYSTEM_USER_ID ||
    user.id == post.user_id
  end

  def all_allowed_users(post)
    @all_allowed_users ||= post.topic.all_allowed_users.reject { |u| not_allowed?(u, post) }
  end

  def allowed_users(post)
    @allowed_users ||= post.topic.allowed_users.reject { |u| not_allowed?(u, post) }
  end

  def allowed_group_users(post)
    @allowed_group_users ||= post.topic.allowed_group_users.reject { |u| not_allowed?(u, post) }
  end

  def directly_targeted_users(post)
    allowed_users(post) - allowed_group_users(post)
  end

  def indirectly_targeted_users(post)
    allowed_group_users(post)
  end

  def after_save_post(post, new_record = false)
    notified = [post.user]

    # mentions (users/groups)
    mentioned_groups, mentioned_users = extract_mentions(post)

    if mentioned_groups || mentioned_users
      mentioned_opts = {}
      if post.last_editor_id != post.user_id
        # Mention comes from an edit by someone else, so notification should say who added the mention.
        editor = post.last_editor
        mentioned_opts = {user_id: editor.id, original_username: editor.username, display_username: editor.username}
      end

      expand_group_mentions(mentioned_groups, post) do |group, users|
        notify_non_pm_users(users - notified, :group_mentioned, post, mentioned_opts.merge({group: group}))
        notified += users
      end

      if mentioned_users
        notify_non_pm_users(mentioned_users - notified, :mentioned, post, mentioned_opts)
        notified += mentioned_users
      end
    end

    # replies
    reply_to_user = post.reply_notification_target

    if new_record && reply_to_user && !notified.include?(reply_to_user) && post.post_type == Post.types[:regular]
      notify_non_pm_users(reply_to_user, :replied, post)
      notified += [reply_to_user]
    end

    # quotes
    quoted_users = extract_quoted_users(post)
    notify_non_pm_users(quoted_users - notified, :quoted, post)
    notified += quoted_users

    # linked
    linked_users = extract_linked_users(post)
    notify_non_pm_users(linked_users - notified, :linked, post)
    notified += linked_users

    # private messages
    if new_record
      if post.topic.private_message?
        # users that aren't part of any mentioned groups
        directly_targeted_users(post).each do |user|
          notification_level = TopicUser.get(post.topic, user).try(:notification_level)
          if notified.include?(user) || notification_level == TopicUser.notification_levels[:watching]
            create_notification(user, Notification.types[:private_message], post)
          end
        end
        # users that are part of all mentionned groups
        indirectly_targeted_users(post).each do |user|
          # only create a notification when watching the group
          notification_level = TopicUser.get(post.topic, user).try(:notification_level)

          if notification_level == TopicUser.notification_levels[:watching]
            create_notification(user, Notification.types[:private_message], post)
          elsif notification_level == TopicUser.notification_levels[:tracking]
            if notified.include?(user)
              create_notification(user, Notification.types[:private_message], post)
            else
              notify_group_summary(user, post)
            end
          end
        end
      elsif post.post_type == Post.types[:regular]
        # If it's not a private message and it's not an automatic post caused by a moderator action, notify the users
        notify_post_users(post, notified)
      end
    end

    sync_group_mentions(post, mentioned_groups)

    if new_record && post.post_number == 1
      topic = post.topic

      if topic.present?
        cat_watchers = topic.category_users
                            .where(notification_level: CategoryUser.notification_levels[:watching_first_post])
                            .pluck(:user_id)

        tag_watchers = topic.tag_users
                            .where(notification_level: TagUser.notification_levels[:watching_first_post])
                            .pluck(:user_id)

        group_ids = topic.allowed_groups.pluck(:group_id)
        group_watchers = GroupUser.where(group_id: group_ids,
                                         notification_level: GroupUser.notification_levels[:watching_first_post])
                                  .pluck(:user_id)

        watchers = [cat_watchers, tag_watchers, group_watchers].flatten

        notify_first_post_watchers(post, watchers)
      end
    end
  end

  def notify_first_post_watchers(post, user_ids)
    return if user_ids.blank?

    user_ids.uniq!

    # Don't notify the OP
    user_ids -= [post.user_id]

    User.where(id: user_ids).each do |u|
      create_notification(u, Notification.types[:watching_first_post], post)
    end
  end

  def sync_group_mentions(post, mentioned_groups)
    GroupMention.where(post_id: post.id).destroy_all
    return if mentioned_groups.blank?

    mentioned_groups.each do |group|
      GroupMention.create(post_id: post.id, group_id: group.id)
    end
  end

  def unread_posts(user, topic)
    Post.secured(Guardian.new(user))
        .where('post_number > COALESCE((
               SELECT last_read_post_number FROM topic_users tu
               WHERE tu.user_id = ? AND tu.topic_id = ? ),0)',
                user.id, topic.id)
        .where('reply_to_user_id = ? OR exists(
            SELECT 1 from topic_users tu
            WHERE tu.user_id = ? AND
              tu.topic_id = ? AND
              notification_level = ?
            )', user.id, user.id, topic.id, TopicUser.notification_levels[:watching])
        .where(topic_id: topic.id)
  end

  def first_unread_post(user, topic)
    unread_posts(user, topic).order('post_number').first
  end

  def unread_count(user, topic)
    unread_posts(user, topic).count
  end

  def destroy_notifications(user, type, topic)
    return if user.blank?
    return unless Guardian.new(user).can_see?(topic)

    user.notifications.where(notification_type: type,
                             topic_id: topic.id).destroy_all
    # HACK so notification counts sync up correctly
    user.reload
  end

  NOTIFIABLE_TYPES = [:mentioned, :replied, :quoted, :posted, :linked, :private_message, :group_mentioned].map{ |t|
    Notification.types[t]
  }

  def group_stats(topic)
    topic.allowed_groups.map do |g|
      {
        group_id: g.id,
        group_name: g.name.downcase,
        inbox_count: Topic.exec_sql(
        "SELECT COUNT(*) FROM topics t
         JOIN topic_allowed_groups g ON g.group_id = :group_id AND g.topic_id = t.id
         LEFT JOIN group_archived_messages a ON a.topic_id = t.id AND a.group_id = g.group_id
         WHERE a.id IS NULL AND t.deleted_at is NULL AND t.archetype = 'private_message'",
          group_id: g.id).values[0][0].to_i
      }
    end
  end

  def notify_group_summary(user,post)

    @group_stats ||= {}
    stats = (@group_stats[post.topic_id] ||= group_stats(post.topic))
    return unless stats

    group_id = post.topic
                   .topic_allowed_groups
                   .where(group_id: user.groups.pluck(:id))
                   .pluck(:group_id).first

    stat = stats.find{|s| s[:group_id] == group_id}
    return unless stat && stat[:inbox_count] > 0

    notification_type = Notification.types[:group_message_summary]

    Notification.where(notification_type: notification_type, user_id: user.id).each do |n|
      n.destroy if n.data_hash[:group_id] == stat[:group_id]
    end

    Notification.create(
      notification_type: notification_type,
      user_id: user.id,
      data: {
        group_id: stat[:group_id],
        group_name: stat[:group_name],
        inbox_count: stat[:inbox_count],
        username: user.username_lower
      }.to_json
    )

    # TODO decide if it makes sense to also publish a desktop notification
  end

  def should_notify_edit?(notification, opts)
    return notification.data_hash["display_username"] != opts[:display_username]
  end

  def should_notify_like?(user, notification)

    return true if user.user_option.like_notification_frequency == UserOption.like_notification_frequency_type[:always]

    return true if user.user_option.like_notification_frequency == UserOption.like_notification_frequency_type[:first_time_and_daily] && notification.created_at < 1.day.ago

    return false
  end

  def should_notify_previous?(user, notification, opts)
    case notification.notification_type
    when Notification.types[:edited] then should_notify_edit?(notification, opts)
    when Notification.types[:liked]  then should_notify_like?(user, notification)
    else false
    end
  end

  COLLAPSED_NOTIFICATION_TYPES ||= [
    Notification.types[:replied],
    Notification.types[:quoted],
    Notification.types[:posted],
  ]

  def create_notification(user, type, post, opts=nil)
    return if user.blank?
    return if user.id == Discourse::SYSTEM_USER_ID

    return if type == Notification.types[:liked] && user.user_option.like_notification_frequency == UserOption.like_notification_frequency_type[:never]

    opts ||= {}

    # Make sure the user can see the post
    return unless Guardian.new(user).can_see?(post)

    notifier_id = opts[:user_id] || post.user_id # xxxxx look at revision history

    # apply muting here
    return if notifier_id && MutedUser.where(user_id: user.id, muted_user_id: notifier_id)
                                      .joins(:muted_user)
                                      .where('NOT admin AND NOT moderator')
                                      .exists?

    # skip if muted on the topic
    return if TopicUser.get(post.topic, user).try(:notification_level) == TopicUser.notification_levels[:muted]

    # skip if muted on the group
    if group = opts[:group]
      return if GroupUser.find_by(group_id: opts[:group_id], user_id: user.id).try(:notification_level) == TopicUser.notification_levels[:muted]
    end

    # Don't notify the same user about the same notification on the same post
    existing_notification = user.notifications
                                .order("notifications.id DESC")
                                .find_by(topic_id: post.topic_id,
                                         post_number: post.post_number,
                                         notification_type: type)

    return if existing_notification && !should_notify_previous?(user, existing_notification, opts)

    notification_data = {}

    if  existing_notification &&
        existing_notification.created_at > 1.day.ago &&
        user.user_option.like_notification_frequency == UserOption.like_notification_frequency_type[:always]

      data = existing_notification.data_hash
      notification_data["username2"] = data["display_username"]
      notification_data["count"] = (data["count"] || 1).to_i + 1
      # don't use destroy so we don't trigger a notification count refresh
      Notification.where(id: existing_notification.id).destroy_all
    end

    collapsed = false

    if COLLAPSED_NOTIFICATION_TYPES.include?(type)
      COLLAPSED_NOTIFICATION_TYPES.each do |t|
        destroy_notifications(user, t, post.topic)
      end
      collapsed = true
    end

    if type == Notification.types[:private_message]
      destroy_notifications(user, type, post.topic)
      collapsed = true
    end

    original_post = post
    original_username = opts[:display_username] || post.username # xxxxx need something here too

    if collapsed
      post = first_unread_post(user, post.topic) || post
      count = unread_count(user, post.topic)
      if count > 1
        I18n.with_locale(user.effective_locale) do
          opts[:display_username] = I18n.t('embed.replies', count: count)
        end
      end
    end

    UserActionCreator.log_notification(original_post, user, type, opts[:acting_user_id])

    topic_title = post.topic.title
    # when sending a private message email, keep the original title
    if post.topic.private_message? && modifications = post.revisions.map(&:modifications)
      if first_title_modification = modifications.find { |m| m.has_key?("title") }
        topic_title = first_title_modification["title"][0]
      end
    end

    notification_data.merge!({
      topic_title: topic_title,
      original_post_id: original_post.id,
      original_post_type: original_post.post_type,
      original_username: original_username,
      display_username: opts[:display_username] || post.user.username
    })

    if group = opts[:group]
      notification_data[:group_id] = group.id
      notification_data[:group_name] = group.name
    end

    # Create the notification
    user.notifications.create(notification_type: type,
                              topic_id: post.topic_id,
                              post_number: post.post_number,
                              post_action_id: opts[:post_action_id],
                              data: notification_data.to_json)

   if !existing_notification && NOTIFIABLE_TYPES.include?(type)
     # we may have an invalid post somehow, dont blow up
     post_url = original_post.url rescue nil
     if post_url
        payload = {
          notification_type: type,
          post_number: original_post.post_number,
          topic_title: original_post.topic.title,
          topic_id: original_post.topic.id,
          excerpt: original_post.excerpt(400, text_entities: true, strip_links: true, remap_emoji: true),
          username: original_username,
          post_url: post_url
        }

        MessageBus.publish("/notification-alert/#{user.id}", payload, user_ids: [user.id])
        push_notification(user, payload)
        DiscourseEvent.trigger(:post_notification_alert, user, payload)
     end
   end

  end

  def push_notification(user, payload)
    if SiteSetting.allow_user_api_key_scopes.split("|").include?("push") && SiteSetting.allowed_user_api_push_urls.present?
      clients = user.user_api_keys
          .where("('push' = ANY(scopes) OR 'notifications' = ANY(scopes)) AND push_url IS NOT NULL AND position(push_url in ?) > 0 AND revoked_at IS NULL",
                  SiteSetting.allowed_user_api_push_urls)
          .pluck(:client_id, :push_url)

      if clients.length > 0
        Jobs.enqueue(:push_notification, clients: clients, payload: payload, user_id: user.id)
      end
    end
  end

  def expand_group_mentions(groups, post)
    return unless post.user && groups

    Group.mentionable(post.user).where(id: groups.map(&:id)).each do |group|
      next if group.user_count >= SiteSetting.max_users_notified_per_group_mention
      yield group, group.users
    end

  end

  # TODO: Move to post-analyzer?
  def extract_mentions(post)
    mentions = post.raw_mentions

    return unless mentions && mentions.length > 0

    groups = Group.where('LOWER(name) IN (?)', mentions)
    mentions -= groups.map(&:name).map(&:downcase)

    return [groups, nil] unless mentions && mentions.length > 0

    users = User.where(username_lower: mentions).where.not(id: post.user_id)

    [groups, users]
  end

  # TODO: Move to post-analyzer?
  # Returns a list of users who were quoted in the post
  def extract_quoted_users(post)
    post.raw.scan(/\[quote=\"([^,]+),.+\"\]/).uniq.map do |m|
      User.find_by("username_lower = :username AND id != :id", username: m.first.strip.downcase, id: post.user_id)
    end.compact
  end

  def extract_linked_users(post)
    post.topic_links.where(reflection: false).map do |link|
      linked_post = link.link_post
      if !linked_post && topic = link.link_topic
        linked_post = topic.posts(post_number: 1).first
      end
      (linked_post && post.user_id != linked_post.user_id && linked_post.user) || nil
    end.compact
  end

  # Notify a bunch of users
  def notify_non_pm_users(users, type, post, opts=nil)

    return if post.topic.try(:private_message?)

    users = [users] unless users.is_a?(Array)

    users.each do |u|
      create_notification(u, Notification.types[type], post, opts)
    end
  end

  def notify_post_users(post, notified)
    return unless post.topic

    condition = <<SQL

    id IN (
      SELECT user_id FROM topic_users
        WHERE notification_level = :watching AND topic_id = :topic_id

      UNION ALL

      SELECT cu.user_id FROM category_users cu
      LEFT JOIN topic_users tu ON tu.user_id = cu.user_id AND tu.topic_id = :topic_id
      WHERE cu.notification_level = :watching AND cu.category_id = :category_id AND tu.user_id IS NULL

      /*tags*/
    )
SQL

    tag_ids = post.topic.topic_tags.pluck('topic_tags.tag_id')
    if tag_ids.present?
      condition.sub! "/*tags*/", <<SQL
      UNION ALL

      SELECT tag_users.user_id FROM tag_users
      LEFT JOIN topic_users tu ON tu.user_id = tag_users.user_id AND tu.topic_id = :topic_id
      WHERE tag_users.notification_level = :watching AND tag_users.tag_id IN (:tag_ids) AND tu.user_id IS NULL
SQL
    end

    notify = User.where(condition,
                          watching: TopicUser.notification_levels[:watching],
                          topic_id: post.topic_id,
                          category_id: post.topic.category_id,
                          tag_ids: tag_ids
                       )

    exclude_user_ids = notified.map(&:id)
    notify = notify.where("id NOT IN (?)", exclude_user_ids) if exclude_user_ids.present?

    notify.each do |user|
      create_notification(user, Notification.types[:posted], post)
    end
  end

end

redpajama_set_name: RedPajamaGithub


Coldplay announced on Friday that they will release a career-spanning documentary that will be available for streaming on Amazon Prime and will play in theaters for one night only.
Titled "Coldplay: A Head Full of Dreams," which is also the name of the British pop-rock band's 2015 album, will document the band's "colourful" 20-year career, and touts the brotherly bond formed by band members Chris Martin, Guy Berryman, Jonny Buckland and Will Champion.
"A Head Full of Dreams" will be available to stream exclusively on Amazon Prime Video starting in the U.K., U.S, Australia and New Zealand on Nov. 16 with local language versions available globally soon after.
There will be a one-night showing of the film in collaboration with Trafalgar Releasing on more than 2,000 screens on Nov. 14. Tickets are on sale starting next week, Friday, October 19, from coldplay.film.
Mat Whitecross, who previously directed the impressive documentary "Supersonic" on another massive British rock band, Oasis, and has also directed several Coldplay music videos, including "Paradise," "A Sky Full of Stars" and "Adventure of a Lifetime," will direct.
"A Head Full of Dreams" includes archival footage of the band's early days, but from their "A Head Full of Dreams" tour, which was certified as the third biggest tour of all time, playing to more than 5.5 million fans across the world.
Amazon also released a trailer for the film along with the announcement.


Life coaching is something related with the questions like what does it mean, what you want to do in your life etc. Basically it is a democracy of solving the problems of the people. Solving your problem is not difficult as you might think sometimes. In the language of a psychologist- it is easy to solve the questions of math but it is not easy to read the questions of human mind. Coaching is most important if it is for business, career and relationship etc. Coaches are specialized to enhance the lifestyle and to remove the emotional stress. In this article I would discuss some of the guidelines to make your life better.
Taking some relevant action will help you to fight against worries and you will be able to fix your problems. All you need to think about the best solution. I have a very good example. If your home is in the great need of repair and you are worried about the damages of your home from natural disaster strikes then instead of worrying about the disaster strikes, repair your home strong and powerful against the potential disaster. This is best possible solution or we can say relevant action.
There are some people who do not want to take the help of others. You must get some help if you really need. If you think that you need some help then consider the help of your friends and family members.
You must breath slowly to control the heart rate and to calm your nerves. Take a long walk with your close friend. Few minutes of medication and yoga is best to reduce the stress. At that moment you will feel yourself out of all worries.
Keeping a personal diary is a best way to release your stress and worries on the daily basis. Open the diary, pick up the pen and get all the worries out of your mind on the paper. You should try to be very specific and clear why exactly you are worried about. Always inspire yourself for doing something good in your life.
Some of the worries are helpful for the happy life because it is something that helps in decreasing the responsibilities etc. Thanks for taking keen interest in this post.