# ALMA CO Observations of the Gamma-Ray Supernova Remnant RX J1713.7$-$3946:
Discovery of Shocked Molecular Cloudlets and Filaments at 0.01 pc scales

H. Sano National Astronomical Observatory of Japan, Mitaka, Tokyo 181-8588,
Japan<EMAIL_ADDRESS>Department of Physics, Nagoya University,
Furo-cho, Chikusa-ku, Nagoya 464-8601, Japan  Institute for Advanced Research,
Nagoya University, Furo-cho, Chikusa-ku, Nagoya 464-8601, Japan  T. Inoue
Department of Physics, Nagoya University, Furo-cho, Chikusa-ku, Nagoya
464-8601, Japan  K. Tokuda National Astronomical Observatory of Japan, Mitaka,
Tokyo 181-8588, Japan<EMAIL_ADDRESS>Department of Physical
Science, Graduate School of Science, Osaka Prefecture University, 1-1 Gakuen-
cho, Naka-ku, Sakai 599-8531, Japan  T. Tanaka Department of Physics, Kyoto
University, Kitashirakawa Oiwake-cho, Sakyo, Kyoto 606-8502, Japan  R.
Yamazaki  Department of Physics and Mathematics, Aoyama Gakuin University,
5-10-1 Fuchinobe, Sagamihara 252-5258, Japan  Institute of Laser Engineering,
Osaka University, 2-6 Yamadaoka, Suita, Osaka 565-0871, Japan  S. Inutsuka
Department of Physics, Nagoya University, Furo-cho, Chikusa-ku, Nagoya
464-8601, Japan  F. Aharonian  Dublin Institute for Advanced Studies, 31
Fitzwilliam Place, Dublin 2, Ireland  Max-Planck-Institut für Kernphysik, P.O.
Box 103980, D 69029 Heidelberg, Germany  Gran Sasso Science Institute, 7 viale
Francesco Crispi, 67100 L’Aquila, Italy  G. Rowell School of Physical
Sciences, The University of Adelaide, North Terrace, Adelaide, SA 5005,
Australia  M. D. Filipović Western Sydney University, Locked Bag 1797, Penrith
South DC, NSW 1797, Australia  Y. Yamane Department of Physics, Nagoya
University, Furo-cho, Chikusa-ku, Nagoya 464-8601, Japan  S. Yoshiike
Department of Physics, Nagoya University, Furo-cho, Chikusa-ku, Nagoya
464-8601, Japan  N. Maxted School of Science, University of New South Wales,
Australian Defence Force Academy, Canberra, ACT 2600, Australia  H. Uchida
Department of Physics, Kyoto University, Kitashirakawa Oiwake-cho, Sakyo,
Kyoto 606-8502, Japan  T. Hayakawa Department of Physics, Nagoya University,
Furo-cho, Chikusa-ku, Nagoya 464-8601, Japan  K. Tachihara Department of
Physics, Nagoya University, Furo-cho, Chikusa-ku, Nagoya 464-8601, Japan  Y.
Uchiyama  Department of Physics, Rikkyo University, 3-34-1 Nishi Ikebukuro,
Toshima-ku, Tokyo 171-8501, Japan  Y. Fukui  Department of Physics, Nagoya
University, Furo-cho, Chikusa-ku, Nagoya 464-8601, Japan  Institute for
Advanced Research, Nagoya University, Furo-cho, Chikusa-ku, Nagoya 464-8601,
Japan

(Received 2020 October 7; Revised 2020 November 3; Accepted 2020 November 5)

###### Abstract

RX J1713.7$-$3946 is a unique core-collapse SNR that emits bright TeV gamma-
rays and synchrotron X-rays caused by cosmic rays, in addition to interactions
with interstellar gas clouds. We report here on results of ALMA 12CO($J$=1–0)
observations toward the northwestern shell of the SNR. We newly found three
molecular complexes consisting of dozens of shocked molecular cloudlets and
filaments with typical radii of $\sim$0.03–0.05 pc and densities of
$\sim$$10^{4}$ cm-3. These cloudlets and filaments are located not only along
synchrotron X-ray filaments, but also in the vicinity of X-ray hotspots with
month or year-scale time variations. We argue that X-ray hotspots were
generated by shock-cloudlet interactions through magnetic-field amplification
up to mG. The ISM density contrast of $\sim$$10^{5}$, coexistence of molecular
cloudlets and low-density diffuse medium of $\sim$0.1 cm-3, is consistent with
such a magnetic field amplification as well as a wind-bubble scenario. The
small-scale cloud structures also affect hadronic gamma-ray spectra
considering the magnetic field amplification on surface and inside clouds.

Supernova remnants (1667); Interstellar medium (847); Cosmic ray sources
(328); Gamma-ray sources (633); X-ray sources (1822)

##  1 Introduction

Galactic cosmic rays are believed to be accelerated by shockwaves in supernova
remnants (SNR) via the diffusive shock acceleration (DSA; Bell, 1978;
Blandford & Ostriker, 1978), and cosmic ray induced non-thermal radiation has
been predicted and/or detected from various SNRs (e.g., Aharonian et al.,
1994; Drury et al., 1994). In general, the classical DSA theory assumes
uniform density distribution of the interstellar medium (ISM) surrounding
SNRs. However, observational results indicated that non-thermal X-ray and/or
gamma-ray bright SNRs are tightly interacting with dense and clumpy gaseous
medium such as molecular and atomic clouds (e.g., Fukui et al., 2003, 2017;
Aharonian et al., 2008; Zhou et al., 2016; Sano et al., 2020). A key issue at
present is how shock-cloud interaction affects radiation processes of the non-
thermal radiation, as well as acceleration mechanisms of cosmic rays beyond
the DSA.

Figure 1: (a) TeV gamma-ray excess map of RX J1713.7$-$3946 in equational
coordinates obtained by H.E.S.S. (H.E.S.S. Collaboration et al., 2018).
Superposed contours indicate the ISM proton column density (Fukui et al.,
2012). The contour levels are 6, 7, 8, 10, 12, 14, 16, 18, 20, and $22\times
10^{21}$ cm-2. Green rectangles represents the ALMA observed area (small
rectangle) and to be presented area in Figure 1b. The positions of CO peaks C,
D, and L are shown. (b) ALMA CO map toward northwest of RX J1713.7$-$3946\.
Superposed contours indicate the X-ray intensity obtained with Chandra
(Uchiyama et al., 2007). The lowest contour and contour intervals are
$9.5\times 10^{-8}$ and $9.5\times 10^{-9}$ photons cm-2 s-1 pixel-1,
respectively. The colored image in the top left indicates Chandra X-ray map in
the same region as shown in Figure 1b.

The core-collapse SNR RX J1713.7$-$3946 (a.k.a. G347.3$-$0.5) provides the
best laboratory to test the effect because of its bright non-thermal X-rays
and TeV gamma-rays (e.g., Koyama et al., 1997; Aharonian et al., 2004), in
addition to certain interactions with dense gas clouds at the closed distance
of 1 kpc (e.g., Fukui et al., 2003; Moriguchi et al., 2005; Sano et al., 2010;
Maxted et al., 2012) and its young age of $\sim$1600 yr (Wang et al., 1997;
Fukui et al., 2003; Tsuji & Uchiyama, 2016). The X-rays are dominated by
synchrotron radiation up to 120 keV (e.g., Slane et al., 1999; Tanaka et al.,
2008; Tsuji et al., 2019; Kuznetsova et al., 2019). Chandra observations
discovered year-scale time variability of X-ray hotspots on the order of 10
arcsec or 0.05 pc widths as well as X-ray filaments of $\sim$0.1–0.2 pc
widths, indicating efficient cosmic-ray acceleration with amplified magnetic
field (Uchiyama et al., 2007; Higurashi et al., 2020). The TeV gamma-ray
observations of RX J1713.7$-$3946 revealed its shell-like morphology with
photon energies from 200 GeV to 40 TeV (Aharonian et al., 2004, 2006, 2007;
H.E.S.S. Collaboration et al., 2018). Despite a number of efforts to model the
broad-band spectra, the origin of gamma-rays—hadronic, leptonic, or a
combination of both—was not clearly established because all scenarios could
reproduce the observed spectra (see H.E.S.S. Collaboration et al. 2018 and
references therein).

Figure 2: (top panels) ALMA CO velocity channel maps toward RXJ1713NW-East.
Each panel shows CO intensity distribution integrated every 2.0 km s-1 in the
velocity range from $-16.0$ to $-10.0$ km s-1. Superposed contours indicate
the same X-ray intensity as shown in Figure 1b. Yellow crosses indicate
positions of X-ray hot spots identified by Higurashi et al. (2020). The
typical CO cloudlets, CL1–6, and a CO filament are also indicated. (bottom
panels) ALMA CO profiles of CL1–6 (black solid lines). Each spectrum is fitted
by a single Gaussian kernel using the least-squares method.

Investigating the interstellar gas associated with RX J1713.7$-$3946 holds a
key to understanding the radiation processes and efficient acceleration of
cosmic-rays. Fukui et al. (2012) presented a good spatial correspondence
between the TeV gamma-rays and ISM proton column density. This provides an
essential condition for gamma-rays to be predominantly of hadronic origin.
Sano et al. (2010, 2013) found limb-brightening of synchrotron X-rays toward
shocked molecular clouds with a size of $\sim$3 pc, where the small photon
indices of synchrotron X-rays are seen (Sano et al., 2015; Okuno et al.,
2018). The authors proposed a possible scenario that the shock-cloud
interaction generates turbulence that enhances magnetic field and synchrotron
X-rays on the surface of shocked clouds. Moreover, the enhanced turbulence
and/or magnetic field may re-accelerate electrons into higher energy. This
interpretation is also supported by numerical results, and well explains the
observed broad-band spectra without bright thermal X-rays (e.g., Inoue et al.,
2009, 2012; Celli et al., 2019). However, previous studies could not spatially
resolve tiny molecular clouds relating to the X-ray hotspots and filaments at
0.05 pc scales which were predicted by Inoue et al. (2009).

We report here on results of ALMA CO observations toward the northwestern
shell of RX J1713.7$-$3946 with a spatial resolution of $\sim$0.02 pc. Our
findings for complexes of molecular cloudlets at 0.01 pc provide a new
perspective on the ISM surrounding core-collapse SNRs.

##  2 Results

Figure 1a shows the overall TeV gamma-ray morphology of RX J1713.7$-$3946
(H.E.S.S. Collaboration et al., 2018). The TeV gamma-ray shell shows a good
spatial correspondence with the total interstellar proton column density
contours (Fukui et al., 2012). For the dense star-forming core named as peak
C, TeV gamma-ray intensity is reduced respect to its surroundings. Note that
the brightest TeV gamma-ray spot is located in the northwestern shell,
especially in the intermediate region of peaks D and L. The intercloud region
also bright in X-rays with filamentary structures.

Table 1: Physical properties of typical CO cloudlets associated with RX
J1713.7$-$3946

Name | $\alpha_{\mathrm{J2000}}$ | $\delta_{\mathrm{J2000}}$ | $T_{\mathrm{mb}}$ | $V_{\mathrm{peak}}$ | $\Delta V$ | Size | Mass | $n(\mathrm{H_{2}})$
---|---|---|---|---|---|---|---|---
| (h m s) | (∘ $\arcmin$ $\arcsec$) | (K) |  (km $\mathrm{s^{-1}}$) |  (km $\mathrm{s^{-1}}$) | (pc) | ($M_{\sun}$) | (cm-3)
(1) | (2) | (3) | (4) | (5) | (6) | (7) | (8) | (9)
CL1 ………… | 17 12 02.95 |  $-$39 32 20.4 | $10.9\pm 0.6$ | $-14.20\pm 0.05$ | $1.94\pm 0.14$ | 0.08 | 0.37 | $2.6\times 10^{4}$
CL2 ………… | 17 12 02.50 |  $-$39 32 06.7 | $11.7\pm 0.2$ | $-14.45\pm 0.01$ | $1.70\pm 0.03$ | 0.07 | 0.27 | $3.1\times 10^{4}$
CL3 ………… | 17 12 06.48 |  $-$39 31 14.7 |  0$9.6\pm 0.4$ | $-12.50\pm 0.02$ | $0.95\pm 0.04$ | 0.06 | 0.08 | $1.6\times 10^{4}$
CL4 ………… | 17 11 57.33 |  $-$39 32 08.1 |  0$4.4\pm 0.2$ | $-12.32\pm 0.05$ | $2.79\pm 0.12$ | 0.10 | 0.33 | $1.2\times 10^{4}$
CL5 ………… | 17 11 53.17 |  $-$39 31 21.3 | $13.5\pm 0.9$ | $-11.99\pm 0.05$ | $1.38\pm 0.11$ | 0.10 | 0.47 | $2.0\times 10^{4}$
CL6 ………… | 17 11 52.72 |  $-$39 33 35.2 |  0$6.0\pm 0.6$ | $-11.49\pm 0.06$ | $1.09\pm 0.14$ | 0.07 | 0.08 | $1.0\times 10^{4}$

Note. — Col. (1): Cloudlet name. Cols. (2–9): Observed properties of cloudlets
obtained by single Gaussian fitting with 12CO($J$=1–0) emission line. Cols.
(2)–(3): Position of cloudlets. Col. (4): Maximum brightness temperature. Col.
(5): Central velocity. Col. (6): FWHM linewidth. Col. (7): Effective diameter
of cloudlets defined as $(S/\pi)^{0.5}\times 2$, where $S$ is the surface area
of cloudlets surrounded by a contour of the half level of maximum integrated
intensity. Col. (8): Mass of cloudlets defined as $m_{\mathrm{p}}\mu\Omega
D^{2}\sum_{i}[N_{\mathrm{i}}(\mathrm{H_{\mathrm{2}}})]$, where
$m_{\mathrm{p}}$ is the atomic hydrogen mass, $\mu$ is the mean molecular
weight, $D$ is the distance to the SNR, $\Omega$ is the solid angle in a
spatial pixel, and $N$($\mathrm{H_{2}}$) is molecular hydrogen column density
for each pixel. We used $\mu=2.8$ and an equation of
$N(\mathrm{H_{2}})/W(\mathrm{CO})=2.0\times 10^{20}$ (K km s-1)-1 cm-2, where
$W$(CO) is the CO integrated intensity (Bertsch et al., 1993). Col. (9):
Number density of molecular hydrogen $n(\mathrm{H_{2}})$.

Figure 1b shows the 12CO($J$=1–0) integrated intensity map obtained using ALMA
(see Appendix A.1 for detailed information of observations and data
reduction). The integration range of $-16$–$-6$ km s-1 is typical radial
velocity in the northwestern molecular clouds, which is certainly associated
with RX J1713.7$-$3946 (e.g., Fukui et al., 2003, 2012; Moriguchi et al.,
2005; Sano et al., 2010, 2013, 2015; Maxted et al., 2012). We newly identified
three molecular complexes with a size of $\sim$1 pc toward the southeastern
half of the ALMA observed area, in addition to the previously known molecular
cloud peak D. The X-ray bright filaments as shown by contours are nicely along
not only with the three molecular complexes (hereafter RXJ1713NW-East), but
also with a part of the molecular cloud peak D (hereafter RXJ1713NW-West). It
is noteworthy that intercloud diffuse regions show significantly low intensity
(purple colored areas), whereas there are several tiny CO clumps with a size
on the order of 0.01 pc. We hereafter refer to the tiny CO clumps as
“molecular cloudlets.”

Figures 2a–2c show the velocity channel maps of ALMA CO toward RXJ1713NW-East.
We confirmed that one of the newly identified molecular complexes is
consisting of dozens of molecular cloudlets (e.g., CL1–6) and filaments (e.g.,
Figure 2b, $\sim$0.06 pc width). Almost all the molecular cloudlets and
filaments are spatially associated with the X-ray filaments, but the X-ray
minor peaks and X-ray hotspots identified by Higurashi et al. (2020) are
located in the intercloud regions. The typical spatial separations between
X-ray minor peaks or hotspots and nearest CO intensity peaks are
$\sim$0.05–0.15 pc. Figure 2 bottom panels show CO line profiles of the
typical molecular cloudlets CL1–6 which are located near the X-ray filaments
and hotspots without contamination. All the sampled molecular cloudlets are
significantly detected, and show the narrow velocity width ($<2$ km s-1)
except for CL4. Although wing-like profiles are seen toward CL1 and CL5, these
can be explained by other overlapped molecular cloudlets. The physical
properties of molecular cloudlets CL1–6 are summarized in Table 1. The typical
diameters and masses of molecular cloudlets are $\sim$0.06–0.10 pc and
$\sim$0.1–0.5 $M_{\odot}$, respectively. The number densities of molecular
cloudlets are a few 104 cm-3, which were obtained using a CO-to-H2 conversion
factor (see Table 1 note).

Figure 3 shows the enlarged view of the X-ray filament from which flux time
variability was reported by Uchiyama et al. (2007). We compared spatial
distributions of CO and X-rays for each observing epoch (see Appendix A.2 for
detailes). Two X-ray hotspots in July 2000 (Figure 3b) and May 2009 (Figure
3f) are significantly detected. The former was previously reported by Uchiyama
et al. (2007), whereas the latter is newly identified ($\sim$4$~{}\sigma$
above the surrounding level). The latter hotspot was excited within three
years and disappeared within four months. It should be also noted that these
hotspots are located on the intercloud or low-density region, but not in the
direction of dense cloudlets.

Figure 3: (a) Enlarged view of ALMA CO map toward an X-ray hotspot presented
by Uchiyama et al. (2007). (b–h) Sequence of X-ray observations in July 2000,
May 2006, May 2009, and September 2009. All X-ray images show the same
intensity scales. Superposed contours indicate the CO intensity. Gray shaded
areas were eliminated due to low exposure time (see the text).

##  3 Discussion

###  3.1 Origin of highly inhomogeneous density distribution

We spatially resolved shocked molecular cloudlets and filaments toward the
northwestern shell of RX J1713.7$-$3946\. These clumpy structures at 0.01 pc
scales coexist with the low-density intercloud medium. We argue that the
highly inhomogeneous gas environment provides conclusive evidence for a wind-
bubble scenario proposed by Fukui et al. (2012) and Inoue et al. (2012).
Before the supernova explosion, the high-mass progenitor of RX J1713.7$-$3946
ejected its outer hydrogen layer as stellar winds over a time scale of several
$10^{6}$ years. The pre-existent intercloud diffuse gas was completely swept
up and a low-density wind-bubble with a density of $\sim$0.01–0.1 cm-3 was
created (e.g., Weaver et al., 1977). On the other hand, molecular cloudlets
and filaments can survive wind erosion due to their high density $\sim$104
cm-3. Moreover, according to synthetic observations of MHD simulation for
colliding Hi clouds, $\sim$0.1 pc clouds could be newly formed by stellar wind
compression (e.g., Fukui et al., 2018; Tachihara et al., 2021). After the
passage of the supernova shock wave, dense cloudlets and filaments will not be
deformed or evaporated owing to short interacting time. In fact, numerical
simulations show that a molecular cloud with the size 0.2 pc and density
$10^{3}$ cm-3 can survive shock erosion at least 300 years after the passage
of shocks (Celli et al., 2019). The CO line emission without line-broadening
or wing-like profiles also supports this idea.

Note that such inhomogeneous gas density distribution is also expected in
other core-collapse SNRs. Further ALMA observations with high special
resolution on the order of 0.01 pc are needed for complete understanding the
interstellar environment surrounding the SNRs.

###  3.2 Magnetic field amplification via shock-cloudlet interactions

Uchiyama et al. (2007) discovered X-ray hotspots in the northwestern shell of
RX J1713.7$-$3946, which show year-scale time variability of X-ray flux with
the typical spatial scale of $\sim$0.05 pc. Considering the acceleration and
radiative cooling time of cosmic-ray electrons, the authors concluded that the
time variability was caused by amplified magnetic field of mG. Most recently,
Higurashi et al. (2020) presented a detailed analysis of 65 X-ray hotspots;
about one-third of them showed year-scale time variabilities and eight
hotspots showed monthly variabilities with significance of at least 3$\sigma$.
The authors proposed that the time variabilities are caused by dense cloud
cores with a density of $10^{5}$–$10^{7}$ cm-3. In the present section, we
argue that the observed time variabilities can be understood by the magnetic
field amplification through interactions between shockwaves and cloudlets with
a density of $\sim$$10^{4}$ cm-3.

We estimate the magnetic field strength toward the newly identified X-ray
hotspot, following the method by Uchiyama et al. (2007) and Higurashi et al.
(2020). The radiative cooling time of electrons $T_{\mathrm{synch}}$ can be
written as;

$\displaystyle T_{\mathrm{synch}}\sim
1.5\>\Bigl{(}\frac{B}{\mathrm{1~{}mG}}\Bigr{)}^{-1.5}\Bigl{(}\frac{\varepsilon}{\mathrm{1~{}keV}}\Bigr{)}^{-0.5}\mathrm{(year)}\;\;\;\;$
(1)

where $\varepsilon$ is the photon energy of synchrotron X-rays and $B$ is the
magnetic field strength. Considering the short decay time of four months and
$\varepsilon=1$ keV, we can obtain $\sim$3 mG toward the X-ray hotspot. On the
other hand, the acceleration time of electrons $T_{\mathrm{acc}}$ can be
expressed in terms of gyro-factor $\eta=(B/\delta B)^{2}$ and shock velocity
$V_{\mathrm{s}}$ as

$\displaystyle T_{\mathrm{acc}}\sim
1\eta\>\Bigl{(}\frac{B}{\mathrm{1~{}mG}}\Bigr{)}^{-1.5}\Bigl{(}\frac{\varepsilon}{\mathrm{1~{}keV}}\Bigr{)}^{0.5}\Bigl{(}\frac{V_{\mathrm{s}}}{3000~{}\mathrm{km~{}s^{-1}}}\Bigr{)}^{-2}\mathrm{(year)}.\;\;\;\;$
(2)

Adopting observed values of $\eta$ = 1 (Tsuji et al., 2019) and
$V_{\mathrm{s}}=3900$ km s-1 (Tsuji & Uchiyama, 2016), the magnetic field
strength $B$ is estimated to $\sim$300 $\mu$G. Note that it is natural to have
different magnetic field in Equations (1) and (2), because cosmic-rays do not
need to be accelerated in the same location.

We argue that the strong magnetic field in X-ray hotspots as well as diffuse
X-ray filaments was generated by shock-cloudlet interactions. According to MHD
simulations by Inoue et al. (2009, 2012), the shock-cloud interaction
generates multiple eddies that enhance magnetic field strength up to mG on the
surface of dense Hi clouds with a density of $\sim$$10^{2}$ cm-3. Subsequent
numerical simulation confirmed that the magnetic field is also amplified by
interactions between shocks and a molecular clump with a density of $10^{3}$
cm-3 (Celli et al., 2019). Note that the most enhanced magnetic field is
placed $\sim$0.4 pc away from the shocked cloud by adopting the cloud size of
0.2 pc and the ISM density contrast of $\sim$$10^{5}$ (see Figure 3 in Celli
et al., 2019). For the northwestern shell of RX J1713.7$-$3946, the ISM
density contrast is estimated to $\sim$$10^{5}$ considering the electron
density in an intercloud region $\sim$0.10–0.13 cm-3 (Katsuda et al., 2015)
and the cloudlet density $\sim$$10^{4}$ cm-3. The highest magnetic field is
therefore expected to be $\sim$0.12–0.20 pc away from the observed cloudlet
with sizes of 0.06–0.10 pc, which is roughly consistent with observed
separations between the X-ray hotspots/filaments and cloudlets111Actual
spatial separation between cloudlet and the highest magnetic field will be
slightly modified considering the shape of shocked cloudlet and projected
distance. For the case of Figure 3, we assumed the cylinder shape of shocked
cloud as an extension of spherical cloud assumed by Celli et al. (2019)..

The shock-cloudlet interaction may also induce the spectrum modulation of
synchrotron X-rays. Previous observational studies also indicate spectral
flattening toward the shock interacting region (e.g., Sano et al., 2015; Okuno
et al., 2018; Tanaka et al., 2020). Further spatially resolved X-ray
spectroscopy based on distributions of molecular clouds reveals such spectrum
modulations.

###  3.3 Prospects for gamma-ray spectra toward the northwestern shell

It is thought that the hadronic gamma-ray shows flat $\nu F_{\nu}$ spectrum
from the pion-creation threshold energy at $\sim$0.1 GeV to the maximum energy
achieved by DSA, whereas the leptonic gamma-ray shows hard $\nu F_{\nu}$
spectrum instead. Since the Fermi-LAT detected the hard spectrum with photon
index of 1.5, this was often used to reject the hadronic gamma-ray scenario
from RX J1713.7$-$3946 (e.g., Abdo et al., 2011). On the other hand, the
hadronic gamma-ray can be harder spectrum by considering the inhomogeneous gas
distribution and energy dependent diffusion of cosmic-ray protons (e.g.,
Gabici et al., 2009; Zirakashvili & Aharonian, 2010; Inoue et al., 2012;
Gabici & Aharonian, 2014). In this section, we argue that hadronic gamma-ray
spectrum from the northwestern shell of RX J1713.7$-$3946 will possibly be
flatter than spatially combined spectra.

According to Inoue et al. (2012), the penetration depth of a relativistic
particle into molecular clouds $l_{\mathrm{pd}}$ can be described as below;

$\displaystyle
l_{\mathrm{pd}}=0.1\;\eta^{0.5}\Bigl{(}\frac{E}{10\;\mathrm{TeV}}\Bigr{)}^{0.5}\Bigl{(}\frac{B}{100\;\mathrm{\mu
G}}\Bigr{)}^{-0.5}\Bigl{(}\frac{t}{1000\;\mathrm{yr}}\Bigr{)}^{0.5}\mathrm{(pc)},\;\;\;\;$
(3)

where $E$ is the particle energy and $t$ is the elapsed time passed since the
forward shock encountered the molecular cloud. The magnetic field will be
enhanced not only on the surface of shocked clouds via shock interaction, but
also inside the clouds caused by cosmic-ray streaming what is called Bell
instability (Bell, 2004). Inoue (2019) argued that the Bell instability
induced magnetic field amplification prevent further cosmic-ray penetration
into shocked clouds by diminishing the diffusion coefficient for the cosmic-
ray energy below $\sim$1 TeV. Note that the degree of magnetic field
amplification depends on path length from the surface of shocked clouds,
roughly corresponding to a radius of shocked clouds.

Figure 4 shows $\nu F_{\nu}$ spectra of hadronic gamma-rays with various cloud
radii. According to Moriguchi et al. (2005), typical radii of molecular clouds
associated with the SNR were derived as $\sim$1–2 pc. The densest star-forming
cloud peak C in the southwestern shell is a typical example with a featureless
morphology and central concentration density gradient with an outer radius of
$\sim$1.5 pc (Sano et al., 2010). Therefore, it is natural to be observed hard
gamma-ray spectra ($\nu^{0.5}$ or photon index of 1.5) when we combined them
for the entire remnant (e.g., Abdo et al., 2011). On the other hand, the
brightest gamma-ray peak in the northwestern shell is associated with dozens
of molecular cloudlets and filaments with typical radii of 0.03–0.05 pc,
suggesting that the flatter gamma-ray spectrum will be expected than the case
of 0.08 pc in red curve of Figure 4. Future detailed spatially resolved
spectroscopy of gamma-ray using the Cherenkov Telescope Array (CTA) has a
potential to resolve such spatial difference of gamma-ray spectral shape.

Figure 4: Synthetic $\nu F_{\nu}$ gamma-ray spectra expected from shocked gas
clouds with radii of 0.08, 0.16, 0.24, 0.40, and 1.60 pc, which were
reproduced using numerical results in Inoue (2019). The dashed line indicates
$\nu F_{\nu}\propto\nu^{0.5}$.

In case we do not detect the gamma-ray spectrum flattening in the northwestern
shell of RX J1713.7$-$3946 using CTA, it can be explained that the magnetic
field in the cloudlet surface is more efficiently enhanced than inside the
cloud via the shock-cloudlet interaction. Because smaller cloud size induces
shorter time scale of magnetic field amplification even if the maximum
magnetic field strength does not depend on the cloud size. Alternatively, the
diffusion length of cosmic-rays could be shorter than 0.1 pc if the actual
elapsed time in Equation (3) is significantly smaller than 1000 yrs. In fact,
CO cloudlets in RXJ1713NW-East have been fully overtaken by the shocks, while
the peak D including RXJ1713NW-West is likely now interacting with the forward
shock (e.g., Sano et al., 2013). In any case, the clumpy cloud distribution
interacting with shockwaves is important in understanding the gamma-ray and
X-ray spectra from shock-accelerated cosmic-rays in SNRs.

##  4 Summary

By using ALMA, we have spatially resolved molecular complexes consisting of
the 0.01 pc scale cloudlets and filaments interacting with the northwestern
shell of RX J1713.7$-$3946, where the brightest TeV gamma-rays and synchrotron
X-ray filaments/hotspots are detected. The molecular cloudlets having the
typical radii of $\sim$0.03–0.05 pc and densities of $\sim$104 cm-3 are nicely
along with X-ray filaments and hotspots, indicating that magnetic field is
amplified through shock-cloudlet interactions. The ISM density contrast is to
be $\sim$$10^{5}$, consistent with a wind-bubble scenario. The small-scale
structures or density fluctuations of the ISM may induce spectral modulations
both the hadronic gamma-rays and synchrotron X-rays, beyond the standard DSA.

This paper makes use of the following ALMA data: ADS/JAO.ALMA#2017.1.01406.S.
ALMA is a partnership of ESO (representing its member states), NSF (USA) and
NINS (Japan), together with NRC (Canada), MOST and ASIAA (Taiwan), and KASI
(Republic of Korea), in cooperation with the Republic of Chile. The Joint ALMA
Observatory is operated by ESO, AUI/NRAO and NAOJ. This study was supported by
JSPS KAKENHI Grant Numbers JP18H01232 (R.Y.), JP19K14758 (H.S.) and JP19H05075
(H.S.). K. Tokuda was supported by NAOJ ALMA Scientific Research Grant Number
of 2016-03B. We appreciate the anonymous referee for useful comments and
suggestions, which helped authors to improve the paper.

##  Appendix A Observations and Data Reductions

###  A.1 ALMA CO

Observations of 12CO($J$=1–0) line emission at 115 GHz were carried out using
the ALMA Band 3 (86–116 GHz) during Cycle 5 (PI: H. Sano, proposal ID
2017.1.01406.S). We used 46 antennas of 12-m array, 12 antennas of 7-m array,
and four antennas of total power (TP) array. The observed area was $11\farcm
1\times 6\farcm 4$ rectangular region centered at ($\alpha_{\mathrm{J2000}}$,
$\delta_{\mathrm{J2000}}$) $=$ ($17^{\mathrm{h}}11^{\mathrm{m}}48\fs 0$,
$-39\arcdeg 30\arcmin 57\farcs 6$). The combined baseline length of 12-m and
7-m arrays is from 8.9 to 313.7 m, corresponding to u-v distances from 3.4 to
120.6 $k\lambda$. The data were processed using the Common Astronomy Software
Application (CASA; McMullin et al., 2007) package version 5.6.0. We utilized
the “tclean” task with natural weighting and “multi-scale” deconvolution
algorithm implemented in the CASA package (Cornwell, 2008). We applied
“uvtaper” during the clean processes to improve the imaging quality. We
combined the cleaned interferometer data (12-m+7-m) and calibrated TP array
data by using “feather” task. The beam size of feathered image is $4\farcs
37\times 3\farcs 89$ with a position angle of $-86\fdg 6$, corresponding to a
spatial resolution of $\sim$0.02 pc at the distance of 1 kpc. The typical
noise fluctuations of the feathered image are $\sim$0.13 K at a velocity
resolution of 0.4 km s-1.

###  A.2 Chandra X-rays

We utilized archival X-ray data obtained using Chandra, for which the
observation IDs are 736, 5560, 6370, 10090, 10091, 10092, and 12671 (PI: P.
Slane for 736 and Y. Uchiyama for the others), which were published in
previous papers (Uchiyama et al., 2003, 2007; Lazendic et al., 2003, 2004;
Tsuji & Uchiyama, 2016; Okuno et al., 2018; Tsuji et al., 2019; Higurashi et
al., 2020). The X-ray data were taken with the Advanced CCD Imaging
Spectrometer I-array on July 2000, July 2005, May 2006, January/May/September
2009, and July 2011. We used Chandra Interactive Analysis of Observations
(CIAO; Fruscione et al., 2006) software version 4.12 with CALDB 4.9.1 for data
reprocessing and imaging. All the downloaded data were reprocessed using the
“chandra_repro” task. We then created energy-filtered, exposure-corrected
images using the “fluximage” task for each observation, where the energy band
of 1–2.5 keV. To eliminate regions with low photon statistics, we also masked
areas with 60% or less of maximum exposure time for each observation.

## References

  * Abdo et al. (2011) Abdo, A. A., Ackermann, M., Ajello, M., et al. 2011, ApJ, 734, 28
  * Aharonian et al. (1994) Aharonian, F. A., Drury, L. O., & Voelk, H. J. 1994, A&A, 285, 645
  * Aharonian et al. (2004) Aharonian, F. A., Akhperjanian, A. G., Aye, K.-M., et al. 2004, Nature, 432, 75
  * Aharonian et al. (2006) Aharonian, F., Akhperjanian, A. G., Bazer-Bachi, A. R., et al. 2006, A&A, 449, 223
  * Aharonian et al. (2007) Aharonian, F., Akhperjanian, A. G., Bazer-Bachi, A. R., et al. 2007, A&A, 464, 235
  * Aharonian et al. (2008) Aharonian, F., Akhperjanian, A. G., Bazer-Bachi, A. R., et al. 2008, A&A, 481, 401
  * Bell (1978) Bell, A. R. 1978, MNRAS, 182, 147
  * Bell (2004) Bell, A. R. 2004, MNRAS, 353, 550
  * Bertsch et al. (1993) Bertsch, D. L., Dame, T. M., Fichtel, C. E., et al. 1993, ApJ, 416, 587
  * Blandford & Ostriker (1978) Blandford, R. D. & Ostriker, J. P. 1978, ApJ, 221, L29
  * Celli et al. (2019) Celli, S., Morlino, G., Gabici, S., et al. 2019, MNRAS, 487, 3199
  * Cornwell (2008) Cornwell, T. J. 2008, IEEE Journal of Selected Topics in Signal Processing, 2, 793
  * Drury et al. (1994) Drury, L. O., Aharonian, F. A., & Voelk, H. J. 1994, A&A, 287, 959
  * Fruscione et al. (2006) Fruscione, A., McDowell, J. C., Allen, G. E., et al. 2006, Proc. SPIE, 6270, 62701V
  * Fukui et al. (2003) Fukui, Y., Moriguchi, Y., Tamura, K., et al. 2003, PASJ, 55, L61
  * Fukui et al. (2012) Fukui, Y., Sano, H., Sato, J., et al. 2012, ApJ, 746, 82
  * Fukui et al. (2017) Fukui, Y., Sano, H., Sato, J., et al. 2017, ApJ, 850, 71
  * Fukui et al. (2018) Fukui, Y., Hayakawa, T., Inoue, T., et al. 2018, ApJ, 860, 33
  * Gabici et al. (2009) Gabici, S., Aharonian, F. A., & Casanova, S. 2009, MNRAS, 396, 1629
  * Gabici & Aharonian (2014) Gabici, S. & Aharonian, F. A. 2014, MNRAS, 445, L70
  * H.E.S.S. Collaboration et al. (2018) H.E.S.S. Collaboration, Abdalla, H., Abramowski, A., et al. 2018, A&A, 612, A6
  * Higurashi et al. (2020) Higurashi, R., Tsuji, N., & Uchiyama, Y. 2020, ApJ, 899, 102
  * Inoue (2019) Inoue, T. 2019, ApJ, 872, 46
  * Inoue et al. (2009) Inoue, T., Yamazaki, R., & Inutsuka, S.-. ichiro . 2009, ApJ, 695, 825
  * Inoue et al. (2012) Inoue, T., Yamazaki, R., Inutsuka, S.-. ichiro ., et al. 2012, ApJ, 744, 71
  * Katsuda et al. (2015) Katsuda, S., Acero, F., Tominaga, N., et al. 2015, ApJ, 814, 29
  * Koyama et al. (1997) Koyama, K., Kinugasa, K., Matsuzaki, K., et al. 1997, PASJ, 49, L7
  * Kuznetsova et al. (2019) Kuznetsova, E., Krivonos, R., Churazov, E., et al. 2019, MNRAS, 489, 1828
  * Lazendic et al. (2003) Lazendic, J. S., Slane, P. O., Gaensler, B. M., et al. 2003, ApJ, 593, L27
  * Lazendic et al. (2004) Lazendic, J. S., Slane, P. O., Gaensler, B. M., et al. 2004, ApJ, 602, 271
  * Maxted et al. (2012) Maxted, N. I., Rowell, G. P., Dawson, B. R., et al. 2012, MNRAS, 422, 2230
  * McMullin et al. (2007) McMullin, J. P., Waters, B., Schiebel, D., et al. 2007, Astronomical Data Analysis Software and Systems XVI, 376, 127
  * Moriguchi et al. (2005) Moriguchi, Y., Tamura, K., Tawara, Y., et al. 2005, ApJ, 631, 947
  * Okuno et al. (2018) Okuno, T., Tanaka, T., Uchida, H., et al. 2018, PASJ, 70, 77
  * Sano et al. (2010) Sano, H., Sato, J., Horachi, H., et al. 2010, ApJ, 724, 59
  * Sano et al. (2013) Sano, H., Tanaka, T., Torii, K., et al. 2013, ApJ, 778, 59
  * Sano et al. (2015) Sano, H., Fukuda, T., Yoshiike, S., et al. 2015, ApJ, 799, 175
  * Sano et al. (2020) Sano, H., Plucinsky, P. P., Bamba, A., et al. 2020, ApJ, 902, 53
  * Slane et al. (1999) Slane, P., Gaensler, B. M., Dame, T. M., et al. 1999, ApJ, 525, 357
  * Tachihara et al. (2021) Tachihara, K., Fukui, Y., Hayakawa, T., et al. 2021, PASJ under review, arXiv:1811.02224
  * Tanaka et al. (2008) Tanaka, T., Uchiyama, Y., Aharonian, F. A., et al. 2008, ApJ, 685, 988
  * Tanaka et al. (2020) Tanaka, T., Uchida, H., Sano, H., et al. 2020, ApJ, 900, L5
  * Tsuji & Uchiyama (2016) Tsuji, N. & Uchiyama, Y. 2016, PASJ, 68, 108
  * Tsuji et al. (2019) Tsuji, N., Uchiyama, Y., Aharonian, F., et al. 2019, ApJ, 877, 96
  * Uchiyama et al. (2003) Uchiyama, Y., Aharonian, F. A., & Takahashi, T. 2003, A&A, 400, 567
  * Uchiyama et al. (2007) Uchiyama, Y., Aharonian, F. A., Tanaka, T., et al. 2007, Nature, 449, 576
  * Wang et al. (1997) Wang, Z. R., Qu, Q.-Y., & Chen, Y. 1997, A&A, 318, L59
  * Weaver et al. (1977) Weaver, R., McCray, R., Castor, J., et al. 1977, ApJ, 218, 377
  * Zhou et al. (2016) Zhou, P., Chen, Y., Zhang, Z.-Y., et al. 2016, ApJ, 826, 34
  * Zirakashvili & Aharonian (2010) Zirakashvili, V. N. & Aharonian, F. A. 2010, ApJ, 708, 965


BRAIN L: A book recommender system

Jessie Caridad Martín Sujo (jessiecaridad.martin@salle.url.edu), Elisabet
Golobardes i Ribé<EMAIL_ADDRESS>
Research group on Smart Society

La Salle-Universitat Ramon Llull

Carrer de Sant Joan de la Salle, 42, Barcelona 08022, Spain

Corresponding Author:
Jessie Caridad Martín Sujo
La Salle-Universitat Ramon Llull
Carrer de Sant Joan de la Salle, 42, Barcelona 08022, Spain
Email<EMAIL_ADDRESS>
###### Abstract

Book sales in Spain have fallen progressively, which requires urgent changes
to optimize the sales process as much as possible. This research proposes a
new system, called Base of Reasoning in Artificial Intelligence with Natural
Language (BRAIN L) focused exclusively on the publishing industry. The new
field of knowledge of Artificial Intelligence (AI), Natural Language
Processing (NLP), tecnología del Machine Learning is combined with Case-Based
Reasoning (CBR) techniques for book recommendations. A model is developed to
retrieve similar cases/books supported by NLP techniques for decision making.
In addition, policies are implemented to keep the model evaluated by expert
reviews, where the system not only learns with new cases, but these cases are
real.

###### keywords:

Artificial Intelligence , Machine Learning , Case-Based Reasoning , Case-Based
Recommendation , Natural Language Processing , Book Recommender

††journal: Natural Language Processing Journal

##  1 Introduction

In recent years, in Spain, reading time and the practice of it, as leisure for
the population, has decreased significantly. A study by Megías Queirós &
Rodríguez San Julián [2018], carried out jointly with the Reina Sofía Center
for Adolescence and Youth and Fundación MAPFRE, gathers the opinion of 1,401
young people between the ages of 14 and 24 and different work groups. It shows
that practically half of the young people affirm that, due to the use of
social networks, study and reading time decreases. Even recently, systems have
been created to analyze the time spent by readers, such as the one implemented
in the study by Martín Sujo et al. [2022], where the authors show an 88%
effectiveness in predicting the permanence of readers in digital newspapers.
In that study the data indicates that the larger content (length of the text)
of the news along with an intermediate number of audios inserted in it, the
greater the probability that a reader will be attracted to it. Obviously a
book does not have the same characteristics as digital news and audio cannot
be inserted. But these studies inspire us to look for solutions to once again
captivate the reader in the literary world.

But why don’t people read nowadays? This question may be based on multiple
well-known factors such as prices, piracy, the impact of crises, among others.
But, an essential point in this problem is found in the poor connection of the
reader with the literary work.

The situation described above leads to the question: Would designing a book
recommender based on reader behavior encourage more reading?

The main objectives of this research are:

  * 1.

Create a memory of cases, not only with the books to recommend but also the
determination of a psychological profile of the reader.

  * 2.

Evaluate the similarity of the text entered in the new CBR case with the texts
of the case memory.

  * 3.

Implement policies so that real cases are saved during the memory storage
phase.

Starting from the basis of the research question and the stated objectives, it
is hypothesized: It is possible to build a book recommendation system that
meets the needs of readers and allows them to enrich their reading and
satisfaction.

The article is organized in the following manner. First, in section 2, the
work related to the topic of this study is reviewed. Then, in section 3, the
research design and the method used are described. Next, the results of the
experiment are presented in section 5. Finally, in section 6, the results are
discussed and section 7 concludes by describing the general contributions of
the research as well as future directions.

##  2 Related works

This study proposes a framework to support decision making regarding book
recommendation, which integrates techniques such as NLP and CBR. Previous
works on relevant aspects are reviewed in the following parts.

###  2.1 CBR origin and evolution

The first contributions in the area of case-based reasoning (CBR) were from
Schank & Abelson [1977], where the use of CBR as a conceivable high-level
model for cognitive processing was highly appreciated. Later, in 1994, Aamodt
& Plaza [1994] successfully used it in several domains, such as prediction,
control, and planning. With the evolution of Artificial Intelligence (AI),
many works focus on incorporating this type of reasoning into AI systems:
Schank [1983], Resnick & Varian [1997], Yu et al. [2003], Wang & Yang [2012],
Wang et al. [2020] among other studies that have been developed to date
present. Recently a study by Adelomou et al. [2022] has linked case-based
reasoning with the quantum world, where more complex algorithms combined with
quantum are used to determine similar cases in the Recovery phase. If the
review focuses on the publishing sector, the study carried out by Chang & Lai
[2005] even offers us the possibility of merging Artificial Intelligence
algorithms within the same system to improve its accuracy. Research by Chen
[2008] shows that customers are more interested in books labeled ”customers
who bought this book have also bought” than books labeled ”recommended by
bookstore staff” . In this case, it combines it with unsupervised machine
learning techniques such as self-organizing maps (SOMs) to forecast book
returns to publishers. Later Chang et al. [2006] offers the same approach,
this time achieving a hybrid between genetic algorithms (GA) and CBR. From the
literature reviewed, it is observed that this type of techniques are not
sufficiently exploited in the publishing field, especially in the
recommendation of books that meet the needs of the reader, based on the
writing, since the few that exist usually deal with this type of problem. with
a global aspect such as the most frequent sales and purchases.

###  2.2 Combination of techniques: CBR using NLP

As the work focuses on recommendation systems in the publishing field,
specifically based on the text of books, the literature is searched for
studies referring to the combination of CBR techniques using NLP. Only one
relevant study has been found, although it was outside the editorial domain.
At least the authors of this research have not found related works to date.
The first study by Wu et al. [2020], allows the recovery of metro accident
cases through the development of an ontological model using the NLP technique
for decision making, given that the memory cases consisted of historical
records of accidents. This allows, although not from the same domain, to get a
little closer to the idea of this research and delve into the similarity of
the texts to provide similar cases of a CBR.

###  2.3 Similarity of texts in Spanish through NLP

For the recommendation of books, based on the writing, it is important to
analyze the text both at the lexical level and at the semantic level. The use
of one or the other will depend on the task to be carried out, for example at
the lexical level the words will be organized in groups or fields of meaning
and at the semantic level they will be associated because they belong to the
same grammatical category and share a part of their meaning. As an example,
Figure 1 shows the difference of both levels.

Figure 1: Lexical analysis versus semantic analysis in texts. Lexical analysis
is based on similar words even though the meaning is different. While the
semantic analysis, although it has different words, they present the same
meaning. Source: Own elaboration.

However, the vast majority of studies, such as Salager-Meyer [1991], Gomaa et
al. [2013] on text similarity have focused mainly on the English language. It
which means that there are not as many resources as would be needed when
working with the Spanish language. Of the few studies found, there is a work
of López-Solaz et al. [2016], where they use the vector representation based
on word embeddings for the task of semantic similarity of texts, using
evaluation metrics such as Euclidean distance and cosine. Finally, with all
these studies, a base is taken of the evaluation metrics and the different
approaches that you can take when analyzing a text; and the scarce resources
that still exist in the Spanish language are reaffirmed, despite being the 4th
most spoken language worldwide, as can be seen in Figure 2.

Figure 2: The most spoken languages in the world, with Spanish being the 4th
most spoken. Source: Own elaboration based on
https://es.statista.com/estadisticas/635631/los-idiomas-mas-hablados-en-el-
mundo/

To summarize the authors to date, they do not find related works on a
recommender system in the editorial field based on the similarity of wording.
So it leads to the development of the system proposed in later sections.

##  3 Research design and method

This section describes the system called, Artificial Intelligence Based
Reasoning with Natural Language (BRAIN L), for recommending books based on
readers’ own writing. The general design of the system is shown in Figure 3.

Figure 3: Case-based system architecture combined with NLP. Based on how
readers express themselves, similar cases are searched in the database. For
this, NLP techniques are used for text processing and similarity evaluation
metrics between them. Finally, the best case is returned. This case can be
reused if an expert validates it and considers it appropriate to retain in the
case memory. Source: Own elaboration.

In the following subsections, each of the phases of the system will be
explained in detail.

###  3.1 Data

The memory cases are based on data obtained as the output of a system for
determining the personality of the characters created by Martín Sujo &
Golobardes i Ribé [2022]. A more detailed view of the content is seen in
Figure 4. Containing the text belonging to each character in the book, the
title of the book it belongs to, and the personality associated with the
character according to the Myers-Briggs indicators. It has around 150 initial
cases, although this database will increase as the experts validate it.

To store these cases, make it easier for them to be shared from different
readers at the same time, avoid redundancy and improve the organization of our
system, a MongoDB database has been used.

Figure 4: Data stored within the memory of cases, resulting from a previous
system for determining the personality of the characters. Source: Own
elaboration.

To obtain the readers’ way of expressing themselves, data has been collected
from the social network Twitter, the second social network with the highest
number of users and the easiest to access its data through its own API. Data
have been saved in a MongoDB database. It has around 2,590,705 samples from
the period from April to March 2022.

###  3.2 Retrieve phase

During this phase, the texts expressed by the reader (Twitter user) are
received as the problem to be solved (what books do you recommend based on my
expressions?). It is important to declare that both for the texts of the
reader, as well as for the cases stored in the case base, they are previously
preprocessed, under the same 3 steps that are observed in Figure 3: Text
preprocessing, Tokenization, Vectorization. Once both texts are vectorized,
the similarity between them is determined.

There are different metrics for evaluating the similarity of texts depending
on the grouping of the texts and the embeddings performed. The metrics to use
are:

  * 1.

Cosine: It is a measure of the similarity between two vectors in a space that
has a product in its interior with which the value of the cosine of the angle
included between them is evaluated. Figure 5 shows the calculation of the
metric for a better understanding of the concept. This calculation uses Eq. 1.

Figure 5: Calculation of cosine similarities between two books and a text
entered by the reader (Twitter’s user). Source: Own elaboration.

$Cosine(\theta)=\frac{A\cdot
B}{\|A\|\|B\|}=\frac{\sum_{i=1}^{n}A_{i}B_{i}}{\sqrt{\sum_{i=1}^{n}A_{i}^{2}}\sqrt{\sum_{i=1}^{n}B_{i}^{2}}}$
(1)

where A and B are the texts to compare.

  * 2.

Jaccard: The Jaccard index measures the degree of similarity between two sets,
regardless of the types of elements, since it is based on the intersection of
the sets. Figure 6 shows the calculation of the metric for a better
understanding of the concept. For the calculation, Eq 2 is used.

Figure 6: Venn diagram of the two texts to be analyzed. Where A is the text
entered by the reader and B the text to be compared from the book. And the
similarity is calculated by dividing the intersection (green color) and the
union of the texts (pink color). Source: Own elaboration.

$Jaccard(A,B)=\frac{\|A\cap B\|}{\|A\cup B\|}$ (2)

where A and B are the texts to compare.

  * 3.

SoftCosine: This measure of similarity starts from the same basis as cosine
similarity, but generalizes it further by considering similarities between
pairs of features Sidorov et al. [2014]. This calculation uses Eq 3.

$Softcosine(a,b)=\frac{\sum_{i,j}^{N}s_{ij}a_{i}b_{j}}{\sqrt{\sum_{i,j}^{N}s_{ij}a_{i}a_{j}}\sqrt{\sum_{i,j}^{N}s_{ij}b_{i}b_{j}}}$
(3)

where the matrix $s_{ij}$ represents the similarity between features.

Regarding the embeddings these are:

  * 1.

Word2Vec: Embeddings are performed using a neural network model to learn word
associations from a large corpus of text. For this reason it is good for
semantic analysis. Mikolov et al. [2013]

  * 2.

GloVe: It is a type of word embedding that encodes the co-occurrence
probability relationship between two words as vector differences. Pennington
et al. [2014]

  * 3.

BERT: It is the most advanced technique in the NLP world. It allows extracting
characteristics of the embeddings made to the text, useful for semantic
information. And furthermore, it adds a special MASK token that allows it to
make predictions, finding the words that provide relevant information to the
text. Devlin et al. [2018]

Once the potential cases to solve the problem have been determined, in this
case, the most similar books according to the reader’s writing, the next phase
is continued.

###  3.3 Reuse phase

This phase performs an evaluation of the most optimal solution and returns it
as the proposed solution for the new problem. It is likely that the retrieved
case, if similar enough, is likely to contain a suitable solution. To do this,
the threshold is set at 50%. This allows that once the similar cases have been
recovered and given that they present a score; it is analyzed whether or not
the highest value exceeds this threshold. In cases where it is not passed, 2
possible books are recommended (from highest to lowest score) with a
recommendation reliability message ”Recommendation reliability: -50%”. While
if it passes it, the case with the best score is displayed and the message
”Reliability of the recommendation: +50%”. If the case exceeds the threshold,
it indicates that it is apt to be stored as a possible case within the case
base, thus moving on to the next phase.

###  3.4 Revise phase

A CBR agent usually requires some feedback to know what is going well and what
is going wrong. It is usually done by simulation or by asking a human oracle.
For this reason, during this phase, policies are established in the system so
that experts in the field can validate whether or not the new case is
appropriate to be included in the case base.

The policies to be established:

  * 1.

If the case is validated by a single expert, the case will not be inserted.

  * 2.

If the case is validated by two experts, the criterion of not inserting the
case must be justified.

  * 3.

If the case is validated by three experts, it will be inserted directly into
the database.

###  3.5 Retain phase

If the case solution generated during the review phase needs to be retained
for future problem solving, the case base is updated with a new case learned
in the retention phase. The data that is stored is: the text of the tweet, the
recommended book based on the wording of the tweet and the personality
associated with the recommended book. In this particular case, there is no
implication in storing this data, since it contains the same fields.

Once the design of the system has been understood, and for a better
understanding of the system, the behavior of the entire CBR cycle using NLP
will be illustrated in the next section with a use case.

##  4 Case study

Before showing the results and analyzing them, a case study is proposed, where
the complete operation of the CBR is visualized with a real case. This helps
to understand the experiments in the following section. Figures 7, 8, 9 and 10
show the internal flow of each of the phases of the proposed system.

Figure 7: Retrieve phase. The similar cases found in the case base are shown,
it contains the index of the book that is similar and the score of the
similarity calculation. Source: Own elaboration.

The previous image shows how a new case is introduced, specifically, a tweet.
When searching for similar cases, internally the system will return the most
similar books and the similarity score.

Figure 8: Reuse phase. Obtaining the highest score. It is analyzed if it
exceeds 50% reliability that the recommendation is correct. If you exceed it,
that is the case. The reader is shown the recommended book, including the
currently associated personality type based on its wording. Source: Own
elaboration.

Having several similar cases, internally the system from a threshold
established in this case 0.50, assesses which of the scores is the one that
exceeds said threshold. This will create an internal validation of the
predicted recommendation, before being shown to the end user.

Figure 9: Revise phase. During this phase, the policies are applied so that
the experts with the validated solution determine whether or not it should be
stored in the memory cases. Source: Own elaboration.

If the case selected as optimal and shown to the user can serve as an
experience for future searches in the system, certain policies are
established. The same if they are shown on the screen to the experts, for
their subsequent approval of the insertion of the new case in the memory base.

Figure 10: Retain phase. During this phase, the new validated case is stored.
Source: Own elaboration.

This case study complies with all the previous phases, and after the unanimous
approval of the experts, it is stored within the case base.

##  5 Experimentation and results

Once the operation of the system with the case study has been visualized, the
results of the experiments carried out are presented.

###  5.1 Data

The cases stored in the case base come from an older Martín Sujo & Golobardes
i Ribé [2022] system, which returns the character’s text, the personality type
associated with that text, and the book it belongs to. These data are already
preprocessed, in this system they are only tokenized and vectorized in order
to perform the similarity calculation.

For the data coming from the readers (on Twitter), if they are preprocessed,
eliminating the missing values, since they do not provide any information. As
this research is carried out in the Spanish literary domain, the data is
limited only to the national territory of Spain. Duplicate data is removed.
Only those tweets with more than 20 words are used, thus ensuring that there
is valid content for further analysis. Finally it is grouped by reader.

###  5.2 Retrieve phase

For the system training phase, fragments of untrained books are taken as test
data, in order to verify the effectiveness of the aforementioned techniques.
The modification of the words is also tested, but maintaining the same meaning
of the sentence to test the semantic analysis of the techniques. This is the
best way to determine if the system will be able to recommend books correctly.
During this phase, the different configurations mentioned in the previous
section are tested to find the most optimal for our recommendation system. It
is important to mention that cosine similarity calculations require embedding
in the text; while in Jaccard it is not necessary since it works with the
number of elements per game. The configurations made for the calculation of
the similarity with Cosine are described below.

For the Word2Vec embedding, the embedding of the spaCy library by Honnibal &
Montani [2017] itself is used with an es core news lg model and the Cosine
similarity is calculated. The results are shown in Table 1.

Type of text | Similarity | Time(Min)
---|---|---
Same text | 0.99 | 0.25
Different text | 0.99 | 0.26
Table 1: Cosine Similarity Calculation results with Word2Vec Embedding.

For the BERT embedding the transformer library is used and the data is only
worked with the input, which is the part that contains the tokenization of the
text, and the attention mask is discarded since no predictions will be made.
Since the texts do not have the same length, initially the distance of the
longest text is determined and a padding is performed on the shortest text.
The copy of the collapsed matrix to a single dimension is also made, so that
it has the same shape and the Cosine similarity is calculated. The results are
shown in Table 2.

Type of text | Similarity | Time(Min)
---|---|---
Same text | 0.48 | 204
Different text | 0.32 | 204
Table 2: Cosine Similarity Calculation results with BERT Embedding.

For the GloVe embedding, the gensim library is used with a glove wiki gigaword
50 model which has the functionality of creating the similarity matrix. And
the similarity of SoftCosine is calculated. The results are shown in Table 3.

Type of text | Similarity | Time(Min)
---|---|---
Same text | 0.91 | 840
Different text | 0.86 | 860
Table 3: Soft Cosine Similarity Calculation results with GloVe Embedding.

For Jaccard use no embedding is used. The results are shown in Table 4.

Type of text | Similarity | Time(Min)
---|---|---
Same text | 1.0 | 0.0
Different text | 0.99 | 0.0
Table 4: Jaccard Similarity Calculation results.

Among the best ones, the similarity calculated with simpler techniques such as
Jaccard and Word2Vec can be highlighted. The difference between one technique
or another is hardly noticeable, but in a matter of seconds of execution, it
could be decided to use Jaccard.

###  5.3 Reuse phase

During this phase, it helps to increase the validity of similar cases
retrieved. Firstly, the recovered cases are ordered from highest to lowest
score. The best score is compared with the proposed threshold (50). If it
exceeds it, it is shown to the user, otherwise a message is shown stating that
the reliability of the recommendation is less than 50%.
For better compression, Figure 11 shows another case study where the threshold
is not exceeded. For this, the following tweet is used: “Sonreír es lo más
saludable que puedes hacer a diario”.

Figure 11: In case the established threshold is not exceeded, an explanation
message is displayed, although the two books with the best score are offered
even if the threshold is not exceeded.. Source: Own elaboration.

###  5.4 Revise phase

During this phase the experts will determine whether or not the new case
should be entered into the case base. For this, functions are implemented that
allow validating the policies mentioned in the previous section. The operation
of each of the implemented policies is shown below, where Figures 12 and 13
show the rejected cases.

Figure 12: First policy applied, if a single user is the one who thinks that
it should be inserted, it will not be taken into account. Source: Own
elaboration. Figure 13: Second policy applied, if a single user is against it,
they must store the justification of why the case should not be saved. Source:
Own elaboration.

The third policy is shown in Figure 14, where once the experts unanimously
validate that the new case is apt to be saved in the case base, the next phase
is continued.

Figure 14: Third policy applied, all experts agree that it should be inserted.
Source: Own elaboration.

###  5.5 Retain phase

To better understand the data that is stored in our case memory, Figure 15
shows how the case base is found, with the initial data stored and in Figure
16 how it is found after storing the new case, once validated by the experts.

Figure 15: Base of cases with 150 samples, in this image only the last 5 are
displayed. Source: Own elaboration. Figure 16: Case base updated with the new
case inserted. Source: Own elaboration.

##  6 Discussion

In previous sections, the process of creating the BRAIN L system has been
presented, which is a little more in line with what the reader transmits than
with historical sales. For this we have based ourselves on the idea of Wu et
al. [2020], since of all the related works reviewed to date it is the one that
most resembles the idea that we wanted to work on in this research.
However, his idea was based more on ontologies than on the text itself, and it
is the main contribution that we make with our work. Based on the semantics of
the texts, the aim is to recommend the book that best suits the reader, and
thereby also determine the psychological profile of the reader, thanks to
previous work done by Martín Sujo & Golobardes i Ribé [2022].
It has been shown during the experiments carried out that although the most
advanced embedding technique is BERT, it is not yet ready for calculating text
similarity. The resulting data is unreliable and has a high runtime cost. It
is shown that with simple techniques in NLP such as Jaccard or Word2Vec, good
results can be obtained, reaching up to 99% accuracy in predictions. The final
selection for the Jaccard technique was based on the execution time, which by
seconds is much more optimal than Word2Vec.
Obviously we are aware that memory cases must be expanded and that we must
have the vital experience of experts to validate the new cases entered into
our system, but with this work we want to sow a seed of how to improve
recommendation systems in the literary sector, where it is currently only
recommended based on historical sales.

##  7 Conclusions and futher work

In conclusion, despite the initial data limitations in the BRAIN L system,
promising results can be observed, reaching 99% similarity between texts with
different words and the same meaning. The authors of this work, to date, have
not found a complete CBR system that focuses on the publishing sector and
especially on the recommendation of books focused on the text itself and not
on historical sales. Keep in mind that the recommended books with the reader
can be variable, because they are based on how the reader writes at a given
time on Twitter, which gives a real validity to the system, since it
recommends based on how we express ourselves in different moments of the day.
With the promising results obtained from the experiments carried out, we will
contribute to stimulating the reader’s empathy with the character, and
therefore, to encourage reading since it will adapt more to the reader’s
personality. It is necessary to emphasize the fact that the system is in
Spanish. This provides an extra contribution to the work and community of NLP
in Spanish, which still has a long way to go.

Many different adaptations, tests and experiments have been left for the
future due to limitations. Some of them are summarized here: a) The results
obtained are limited in terms of recovery of cases within a small database of
cases (150 records), the size of the database should be expanded; b)Expand the
recommender and take into account authors, genres, among others; c) Put this
study into production once it has been validated with sufficient data; d)
Increase validation policies and e) Create an interface that is friendlier to
the end user.

## Acknowledgements

It has also been possible thanks to Smart Society research group at La
Salle–Ramon Llull University. We would like to give a special thanks to those
open source institutions that contribute to the possibility of these types of
studies and promote literary culture, to facilitate the personal, cultural,
professional and social development of people.

## References

  * Aamodt & Plaza [1994] Aamodt, A., & Plaza, E. (1994).  Case-based reasoning: Foundational issues, methodological variations, and system approaches.  AI communications, 7, 39–59.
  * Adelomou et al. [2022] Adelomou, P. A., Fauli, D. C., Ribé, E. G., & Vilasis-Cardona, X. (2022).  Quantum case-based reasoning (qcbr).  Artificial Intelligence Review, (pp. 1–27).
  * Chang & Lai [2005] Chang, P.-C., & Lai, C.-Y. (2005).  A hybrid system combining self-organizing maps with case-based reasoning in wholesaler’s new-release book forecasting.  Expert Systems with Applications, 29, 183–192.
  * Chang et al. [2006] Chang, P.-C., Lai, C.-Y., & Lai, K. R. (2006).  A hybrid system by evolving case-based reasoning with genetic algorithm in wholesaler’s returning book forecasting.  Decision Support Systems, 42, 1715–1729.
  * Chen [2008] Chen, Y.-F. (2008).  Herd behavior in purchasing books online.  Computers in Human Behavior, 24, 1977–1992.
  * Devlin et al. [2018] Devlin, J., Chang, M.-W., Lee, K., & Toutanova, K. (2018).  Bert: Pre-training of deep bidirectional transformers for language understanding.  arXiv preprint arXiv:1810.04805, .
  * Gomaa et al. [2013] Gomaa, W. H., Fahmy, A. A. et al. (2013).  A survey of text similarity approaches.  international journal of Computer Applications, 68, 13–18.
  * Honnibal & Montani [2017] Honnibal, M., & Montani, I. (2017).  spaCy 2: Natural language understanding with Bloom embeddings, convolutional neural networks and incremental parsing, .  To appear.
  * López-Solaz et al. [2016] López-Solaz, T., Troyano, J. A., Ortega, F. J., & Enríquez, F. (2016).  Una aproximaciónn al uso de word embeddings en una tarea de similitud de textos en español.  Procesamiento del Lenguaje Natural, (pp. 67–74).
  * Martín Sujo & Golobardes i Ribé [2022] Martín Sujo, J. C., & Golobardes i Ribé, E. (2022).  Personality profile of fictional characters in books using natural language processing.  Personality Profile of Fictional Characters in Books Using Natural Language Processing. Submitted at Computer Speech and Language - Elsevier, .
  * Martín Sujo et al. [2022] Martín Sujo, J. C., Golobardes i Ribé, E., Vilasís Cardona, X., Jiménez Ruano, V., & Villasmil López, J. (2022).  Correction to: Smartdata: An intelligent decision support system to predict the readers permanence in news.  In Proceedings of SAI Intelligent Systems Conference (pp. C1–C1).  Springer.
  * Megías Queirós & Rodríguez San Julián [2018] Megías Queirós, I., & Rodríguez San Julián, E. (2018).  Jóvenes en el mundo virtual: usos, prácticas y riesgos.  Madrid: Centro Reina Sofía sobre Adolescencia y Juventud. FAD. Fundación Mapfre, .
  * Mikolov et al. [2013] Mikolov, T., Yih, W.-t., & Zweig, G. (2013).  Linguistic regularities in continuous space word representations.  In Proceedings of the 2013 conference of the north american chapter of the association for computational linguistics: Human language technologies (pp. 746–751).
  * Pennington et al. [2014] Pennington, J., Socher, R., & Manning, C. D. (2014).  Glove: Global vectors for word representation.  In Proceedings of the 2014 conference on empirical methods in natural language processing (EMNLP) (pp. 1532–1543).
  * Resnick & Varian [1997] Resnick, P., & Varian, H. R. (1997).  Recommender systems.  Communications of the ACM, 40, 56–58.
  * Salager-Meyer [1991] Salager-Meyer, F. (1991).  A text-type based discourse analysis of medical english.  Abstracts internal structuring, .
  * Schank [1983] Schank, R. C. (1983).  Dynamic memory: A theory of reminding and learning in computers and people.  cambridge university press.
  * Schank & Abelson [1977] Schank, R. C., & Abelson, R. (1977).  P.(1977) scripts, plans, goals and understanding: An inquiry into human knowledge structures.
  * Sidorov et al. [2014] Sidorov, G., Gelbukh, A., Gómez-Adorno, H., & Pinto, D. (2014).  Soft similarity and soft cosine measure: Similarity of features in vector space model.  Computación y Sistemas, 18, 491–504.
  * Wang & Yang [2012] Wang, C.-S., & Yang, H.-L. (2012).  A recommender mechanism based on case-based reasoning.  Expert Systems with Applications, 39, 4335–4343.
  * Wang et al. [2020] Wang, D., Wan, K., & Ma, W. (2020).  Emergency decision-making model of environmental emergencies based on case-based reasoning method.  Journal of environmental management, 262, 110382.
  * Wu et al. [2020] Wu, H., Zhong, B., Medjdoub, B., Xing, X., & Jiao, L. (2020).  An ontological metro accident case retrieval using cbr and nlp.  Applied Sciences, 10, 5298.
  * Yu et al. [2003] Yu, R., Iung, B., & Panetto, H. (2003).  A multi-agents based e-maintenance system with case-based reasoning decision support.  Engineering applications of artificial intelligence, 16, 321–333.