\tilde{g}:= (\phi\otimes \id )(\Delta(g)) ~\in~	\binom{n}{1}_{\tau_{u,u}}[u^{n-1}]_\rho + k\langle X\rangle_{<\deg(u^{n-1})}. %\tag{PI}
\end{equation*}

Since $\Delta(g)\in I \otimes  k\langle X\rangle  +  k\langle X\rangle \otimes I$, $\tilde{g}\in I$. But $\lw([u^{n-1}]_\rho) =u^{n-1}$ is $I$-irreducible. So
$$1+\tau_{u,u}+\cdots +\tau_{u,u}^{n-1}=\binom{n}{1}_{\tau_{u,u}}= 0$$

in $k$ and it follows that $\tau_{u,u}$ is a root of unity, say of order $t$, which divides $n$.

If $k$ is of characteristic $0$, then clearly $\tau_{u,u}\neq 1$, in this case we write $n=tq^sa$ with $q=s=1$; if $k$ is of positive characteristic $p$, then we write $n=tq^sa$ with $a$ doesn't divisible by $q:=p$. It remains to show $a=1$. Assume not, let $\psi: k\langle X\rangle \to k$ be the functional given by

* $\psi(I)   =0$, $\psi([w]_\rho) =0$ for $w \in \D_I \backslash \{u^{tq^s} \}$ and $\psi([u^{tq^s}]_\rho) =1$.

Note that $\psi(k\langle X \rangle_{<\deg(u^{tq^s})})=0$ and thereof $\psi(k\langle X \rangle^{\prec u^n}_{\deg(u^{tq^s})}) =0$ by Lemma <ref>. So

\[
\hat{g}:=(\psi\otimes \id)(\Delta(g)) ~\in~\binom{tq^sa}{tq^s}_{\tau_{u,u}}[u^{tq^s(a-1)}]_\rho+  k\langle X\rangle_{<\deg(u^{tq^s(a-1)})}.
\]

Since $\hat{g} \in I$ but $\lw([u^{tq^s(a-1)}]_\rho) = u^{tq^s(a-1)}$ is $I$-irreducible, one has

\[
a=\binom{a}{1} = \binom{q^sa}{q^s} =  \binom{tq^sa}{tq^s}_{\tau_{u,u}} =0,
\]

in $k$,	which is absurd. Here, the third equality is because $\tau_{u,u}$ is of order $t$.

§ PROOF OF PROPOSITION <REF>

This section is devoted to prove Proposition <ref> by the filtered-graded method. The argument has benifited from some of the ideas in the proof of <cit.>.

Let $\Gamma=(\Gamma, <)$ be a well-ordered abelian monoid. Recall that a braided algebra (resp. coalgebra, bialgebra) $\Gamma$-filtration of a braided algebra (resp. coalgebra, bialgebra) $R$ is by definition an algebra (resp. coalgebra, algebra and coalgebra) $\Gamma$-filtration $\mathcal{F}=(F_\gamma(R))_{\gamma\in \Gamma}$ such that

$$\tau(F_\alpha(R) \otimes F_\beta(R)) = F_\beta(R) \otimes F_\alpha(R), \quad \alpha, \beta\in \Gamma.$$

In these cases,  $\gr(R,\mathcal{F})$ is naturally a $\Gamma$-graded braided algebra (resp. coalgebra, bialgebra).

Let $R$ be a connected $\Gamma$-graded braided bialgebra, where $\Gamma$ is a nontrivial abelian monoid that has admissible well orders. Assume $R$ is generated by a homogeneous braided subspace of categorical type. Then there is a  well-ordered abelian monoid $\mathbb{M}$, a bicharacter $\chi$ of $\mathbb{M}\times\Gamma $ and  a braided bialgebra $\mathbb{M}$-filtration $\mathcal{F}=(F_{\alpha}(R))_{\alpha\in \mathbb{M}}$ of $R$ such that $F_{\alpha}(R)$ are all homogeneous and

$$\gr(R,\mathcal{F})=\bigoplus_{(\alpha,\gamma)\in \mathbb{M}\times\Gamma }\big(F_\alpha(R)/F_\alpha^-(R)\big)_\gamma$$
is a connected $(\mathbb{M}\times\Gamma)$-graded braided bialgebra with braiding  $\tau_\chi$, the one induced by $\chi$.

Let $V\subseteq R_+$ be a homogeneous braided subspace of $R$  which is of categorical type and generates $R$. By Lemma <ref>, one may choose a well-ordered homogeneous basis  $X$ of $V$  so that for all $x,y\in X$, there exists a unique nonzero scalar $p_{x,y}\in k$ such that

\begin{eqnarray*}
\tau_V(x\otimes y) \in  p_{x,y} y\otimes x+\sum_{z_1\in X,~ z_1< y} k\cdot z_1\otimes x + \sum_{z_2\in X,~ z_2 < x} k\cdot y\otimes z_2  + \sum_{z_1,\, z_2\in X, ~ z_1<y,\, z_2<x} k\cdot z_1\otimes z_2,
\end{eqnarray*}

where $\tau_V$ denotes the induced braiding on $kX=V$. Since $\tau_V(V_\gamma\otimes V_\delta) = V_\delta\otimes V_\gamma$ for all $\gamma, \delta\in \Gamma$, one may assume $\deg(z_1)=\deg(y)$ and $\deg(z_2)=\deg(x)$ in the above formula.

Let $\mathbb{M}$ be the free abelian monoid on $X$ with the canonical basis denoted by $\{e_x\}_{x\in X}$. Every element of $\mathbb{M}$ has a unique expression of the form
$\sum_{x\in X}m_x e_x$, where $m_x$ are nonnegative integers and they are nonzero for only finitely many $x$.
Equip $\mathbb{M}$ with the admissible well order $<_{\mathbb{M}}$ defined as follows. First fix  an admissible well order $<_\Gamma$ on $\Gamma$; then for $\alpha= \sum_{x\in X}m_x e_x, ~ \beta= \sum_{x\in X}n_x e_x \in \mathbb{M}$,

\begin{eqnarray*}
\alpha<_{\mathbb{M}} \beta ~ \Longleftrightarrow  ~
\exists ~ y\in X \text{ such that }\left\{
\begin{array}{llll}
m_y<n_y  \text{ and }  m_x=n_x \text{ for all } x\in X \text{ with }&& \\
\deg(y) <_\Gamma \deg(x) \text{ or } \deg(y) = \deg(x) \text { but } y<x.
\end{array}\right.
\end{eqnarray*}

Let $D: \langle X\rangle \to \mathbb{M}$ be the monoid map given by  $D(x)= e_x$ for all $x\in X$.

Consider the free algebra $k\langle X\rangle$ as a $\Gamma$-graded braided algebra with braiding the one induced by $\tau_V$.
Let $\tilde{\mathcal{F}} =(\tilde{F}_{\alpha}(k\langle X\rangle))_{\alpha\in \mathbb{M}}$ be the  $\mathbb{M}$-filtration on $k\langle X\rangle$ given by

\begin{eqnarray*}
\tilde{F}_{\alpha}(k\langle X\rangle) := \sum_{u\in \langle X\rangle,~ D(u)\leq \alpha} k u.
\end{eqnarray*}

It is easy to see that $\tilde{\mathcal{F}} $ is an algebra $\mathbb{M}$-filtration of $k\langle X\rangle$ and $\tilde{F}_\alpha(k\langle X\rangle)$ are all homogeneous.

Let $\chi$ be the bicharacter of $\mathbb{M}\times\Gamma$ given by

\[
\chi((e_x,\gamma), (e_y, \delta) )=p_{x,y}, \quad \gamma,\, \delta \in \Gamma, ~~ x,\, y\in X.
\]

Then for all words $u, v\in \langle X\rangle$,  one has

\begin{eqnarray*}\label{key-bicharcater}
\tau_{V}(u\otimes v) &\in& \chi((D(u),\deg(u)), (D(v),\deg(v)))\cdot v\otimes u \\ && + ~ \tilde{F}_{D(v)}(k\langle X\rangle)_{\deg(v)} \otimes \tilde{F}_{D(u)}^-(k\langle X\rangle)_{\deg(u)} + \tilde{F}_{D(v)}^-(k\langle X\rangle)_{\deg(v)} \otimes \tilde{F}_{D(u)}(k\langle X\rangle)_{\deg(u)}
\end{eqnarray*}

by an  evident induction on the length of $u$ and $v$. So

$$\tau_V(\tilde{F}_{\alpha}(k\langle X\rangle)_\gamma\otimes \tilde{F}_{\beta}(k\langle X\rangle)_\delta) \subseteq  \tilde{F}_{\beta}(k\langle X\rangle)_\delta \otimes \tilde{F}_{\alpha}(k\langle X\rangle)_\gamma, \quad (\alpha,\gamma), ~(\beta,\delta) \in \mathbb{M}\times\Gamma.$$

Similarly, one has $\tau_V^{-1} (\tilde{F}_{\beta}(k\langle X\rangle)_\delta \otimes \tilde{F}_{\alpha}(k\langle X\rangle)_\gamma) \subseteq \tilde{F}_{\alpha}(k\langle X\rangle)_\gamma\otimes \tilde{F}_{\beta}(k\langle X\rangle)_\delta$. Hence,

\[
\tau_V(\tilde{F}_{\alpha}(k\langle X\rangle)_\gamma\otimes \tilde{F}_{\beta}(k\langle X\rangle)_\delta) =  \tilde{F}_{\beta}(k\langle X\rangle)_\delta \otimes \tilde{F}_{\alpha}(k\langle X\rangle)_\gamma, \quad (\alpha,\gamma), ~(\beta,\delta) \in \mathbb{M}\times\Gamma.
\]

Therefore, $\tilde{\mathcal{F}}$ is a braided algebra $\mathbb{M}$-filtration of $k\langle X\rangle$. In addition,   $\gr(k\langle X\rangle, \tilde{\mathcal{F}})$ is readily a connected $(\mathbb{M}\times \Gamma)$-graded braided algebra with braiding the one induced by $\chi$.

Note that the canonical map $\pi: (k\langle X\rangle, \tau_V) \to (R, \tau)$ is a surjective homomorphism of $\Gamma$-graded braided algebras. Let $\mathcal{F}:=(F_{\alpha}(R))_{\alpha\in \mathbb{M}}$ be the $\mathbb{M}$-filtration of $R$ given by
$$F_{\alpha}(R):=\pi(\tilde{F}_{\alpha}(k\langle X\rangle)).$$

Clearly, $\mathcal{F}$ is a braided algebra $\mathbb{M}$-filtration of $R$ and $F_\alpha(R)$ are all homogeneous. In addition, $\gr(R,\mathcal{F})$ is a connected $(\mathbb{M}\times \Gamma)$-graded braided algebra with braiding $\tau_\chi$, since the canonical map

$$\gr(\pi):\gr(k\langle X\rangle, \tilde{\mathcal{F}}) \to \gr(R,\mathcal{F})$$
induced from $\pi$ is a surjective homomorphism of $(\mathbb{M}\times \Gamma)$-graded braided algebras. By the counitity of $R$,  there is  a homomorphism of $\Gamma$-graded algebras $\Delta: k\langle X\rangle\to k\langle X\rangle \otimes^{\tau_V} k\langle X\rangle$ such that

$$\Delta(x)  ~ \in ~  1\otimes x + x\otimes 1 +   \big(k\langle X \rangle_+ \otimes k\langle X \rangle_+\big)_{\deg(x)}, \quad x\in X$$

and the following diagram commutes

\begin{eqnarray*}
\xymatrix{
k\langle X\rangle \ar[r]^-{\Delta} \ar[d]_\pi & k\langle X\rangle\otimes^{\tau_V}k\langle X\rangle \ar[d]^{\pi\otimes \pi} \\
R\ar[r]^-{\Delta_R} &  R\otimes^{\tau} R.
\end{eqnarray*}

For all words $u\in \langle X\rangle$, one has

\[
\Delta(u) \in \sum_{\beta_1,\, \beta_2\in \mathbb{M}, ~\beta_1+\beta_2 \leq D(u)} \Big(\tilde{F}_{\beta_1}(k\langle X\rangle) \otimes \tilde{F}_{\beta_2}(k\langle X\rangle)\Big)_{\deg(u)}
\]

by an easy induction on the length of $u$. It follows that

\[
\Delta(\tilde{F}_\alpha(k\langle X\rangle)) \subseteq \sum_{\beta_1,\, \beta_2\in \mathbb{M}, ~\beta_1+\beta_2 \leq \alpha} \tilde{F}_{\beta_1}(k\langle X\rangle) \otimes \tilde{F}_{\beta_2}(k\langle X\rangle), \quad \alpha \in \mathbb{M}.
\]

Thus, by the commutative square given above,

$$\Delta(F_\alpha(R)) \subseteq \sum_{\beta_1,\, \beta_2\in \mathbb{M}, ~\beta_1+\beta_2 \leq \alpha} F_{\beta_1}(R) \otimes F_{\beta_2}(R), \quad \alpha \in \mathbb{M}.$$

So $\mathcal{F}$ is also a coalgebra $\mathbb{M}$-filtration of $R$ and hence the result follows.

Fix a well-ordered abelian monoid $\mathbb{M}$, a bicharacter $\chi$ of $\mathbb{M}\times\Gamma $ and  a braided bialgebra $\mathbb{M}$-filtration $\mathcal{F}=(\mathcal{F}_{\alpha}(R))_{\alpha\in \mathbb{M}}$ of $R$ as that in Lemma <ref>. Clearly, $\mathbb{M}\times \Gamma$ has admissible well orders. Note that $\gr(A,\mathcal{F}|_A) \supseteq \gr(B,\mathcal{F}|_B)$ are homogeneous left (resp. right) coideal subalgebras of $\gr(R,\mathcal{F})$. The  result then follows from Lemma <ref> and Theorem <ref> (1).

§ ACKNOWLEDGMENTS

The author would like to thank Professor James J. Zhang for his suggestion to study coideal subalgebras of connected Hopf algebras by the theory of Lyndon words during the “Noncommutative Algebraic Geometry
Shanghai Workshop” at Shanghai in November 2019. Thanks also to Professor D.-M. Lu for reading the manuscript, pointing out some typos and providing some suggestions. This work is supported by Shanghai Key Laboratory of Pure Mathematics and Mathematical Practice, the NSFC (Grant Nos. 11971141 & 11871186), the Fundamental Research Funds for the Provincial Universities of Zhejiang, and the K.C. Wong Magna Fund in Ningbo University.

§ LYNDON IDEALS OF FREE ALGEBRAS

In this appendix, we introduce the class of Lyndon ideals for free algebras, study the combinatorial and homological properties of the corresponding quotient algebras, and relate them to the class of Artin-Schelter regular algebras. Partial results of this appendix have been published in Chinese version [48]. Gateva-Ivanova has been obtained similar results in [15].  However, compare to her argument, which takes advantage of a deep result of [14], ours is  more direct and concrete.

Throughout, let $\Gamma=\mathbb{N}^\theta$ for some integer $\theta\geq 1$ and equip it with an admissible well order. Let $|\cdot|: \Gamma\to \mathbb{N}$ be the monoid homomorphism given by $(\gamma_1,\ldots,\gamma_\theta)\mapsto \gamma_1+\cdots +\gamma_\theta$. We assume that the free algebra $k\langle X\rangle$ is  $\Gamma$-graded with each letter homogeneous of positive degree.

For an ideal $I$ of $k\langle X\rangle$, we denote by $I^*$ the homogeneous closure of $I$. It is the smallest homogeneous ideal of $k\langle X\rangle $ that contains $I$. It is not hard to see that $I^*$ is spanned by the set of highest nonzero homogeneous components of elements of $I$, and moreover

\[
\B_{I^*}=\B_I, \quad \C_{I^*} =\C_I, \quad  \D_{I^*} =\D_I, \quad \N_{I^*} = \N_I,   \quad \text{and} \quad \OO_{I^*} = \OO_I.
\]

An ideal $I$ of $k\langle X\rangle$ is called Lyndon if $\OO_I$ consists of Lyndon words, or equivalently
$\B_I=\D_I$. Clearly, $I$ is Lyndon if and only if its homogenization $I^*$ is so.

A $\Gamma$-graded vector space $V=\bigoplus_{\gamma\in \Gamma}V_\gamma$ is called locally finite if $\dim V_\gamma <\infty$ for each $\gamma\in \Gamma$. In this case, the Hilbert series of $V$ is defined to be the power series
$${\rm H}_V(\textbf{\rm t}) = \sum_{\gamma\in \Gamma} \dim(V_\gamma) ~ \textbf{\rm t}^\gamma \in \mathbb{Z}[[t_1,\ldots, t_\theta]],$$
where $\textbf{\rm t}^\gamma$ is an abbreviation of $t_1^{\gamma_1}\cdots t_\theta^{\gamma_\theta}$ for $\gamma=(\gamma_1,\ldots, \gamma_\theta)$.

Let $I$ be a homogeneous Lyndon  ideal of $k\langle X\rangle$.  Then $A= k\langle X\rangle/ I$ is locally finite if and only if $\N_I$ is locally finite; and in this case the Hilbert series of $A$ is
$${\rm H}_A(t) =  \prod_{u \in \N_I} \big (1-\textbf{\rm t}^{\deg (u)}  \big )^{-1}.$$

It is well-known that $\dim A_\gamma$ equals the number of $I$-irreducible words of degree $\gamma$, which is $\#\{ u\in \B_I ~|~ \deg(u)=\gamma \}$ for each $\gamma\in \Gamma$. The result follows by an easy combinatoric argument.

Let $I$ be an ideal of $k\langle X\rangle$ and let $A= k\langle X\rangle/ I$.  Let $\F:=(F_\gamma (A))_{\gamma\in \Gamma}$ be the $\Gamma$-filtration of $A$ given by $F_\gamma (A):= (k\langle X\rangle_{\leq \gamma} +I) /I$. Then $\gr(A, \mathcal{F}) \cong k\langle X\rangle/ I^*$ as $\Gamma$-graded algebras.

Let  $\phi: k\langle X\rangle \to \gr(A, \mathcal{F})$ be the $\Gamma$-graded algebra homomorphism given by

$$\phi(x)= (x+I) + F^-_{\deg(x)}(A) \in \gr(A, \mathcal{F})_{\deg(x)}, \quad x\in X.$$

It is easy to check that $\phi$ is a surjective homomorphism  with kernel contains $I^*$. Let $\widetilde{\phi}: k\langle X\rangle/ I^* \to \gr(A, \mathcal{F})$ be the map induced by $\phi$. By  standard Gröbner basis theory,  $\{u+I^*~|~ u\in \D_I \cap \langle X\rangle_\gamma \}$ is a basis of  $(k\langle X \rangle /I^*)_\gamma$ and $\{~ (u+I) +F^-_\gamma(A) ~|~ u\in \D_I \cap \langle X\rangle_\gamma~\}$ is a basis of $\gr(A, \mathcal{F})_\gamma$, for each  $\gamma \in \Gamma$. Since $\widetilde{\phi}$ sends $u+I^*$ to $(u+I) +F^-_\gamma(A)$ for any $u\in \D_I \cap \langle X\rangle_\gamma$, the restriction of $\widetilde{\phi}$ on the $\gamma$-th component  is an isomorphism. Since $\gamma$ is arbitrary, the result follows.

Let $I$ be a Lyndon ideal of $k\langle X\rangle$ and let $A= k\langle X\rangle/ I$. Then $\gkdim A = \#(\N_I).$
In particular, $\gkdim A$ is either infinite or a natural number.

First note that $(\{u+I\}_{u\in \N_I}, <_{\lex})$ is a system of PBW generators of $A$. By Lemma <ref>, one has $\gkdim A \geq \#(\N_I)$. So to see the desired equality, one may assume $\N_I$ is  finite.

First we show the case that $I$ is homogeneous. By changing of grading along the map $|\cdot|:\Gamma \to \mathbb{N}$, naturally one has an $\mathbb{N}$-graded algebra  $A^{\rm tot}=\bigoplus_{n\in \mathbb{N}}(A^{\rm tot})_n$,  which is $A$ as an algebra, and where $(A^{\rm tot})_n:=\sum_{\gamma\in \Gamma, ~|\gamma|=n} A_\gamma$. Note that
$H_{A^{\rm tot}} (t) =\prod_{u \in \N_I} \big (1-t^{|\deg (u)|}\big )^{-1}$. Then

\begin{equation*}\label{Hilbert-GKdim}
\gkdim A = \gkdim A^{\rm tot} = \overline{\lim_{n\to \infty}} \log_n \dim ((A^{\rm tot})_{\leq n}) = \#(\N_I). %\tag{$*$}
\end{equation*}

Here, the last two equalities are by <cit.> and  <cit.>, respectively.

Now we show the general case. Let $\F$ be the $\Gamma$-filtration of $A$  given in Lemma <ref>. By Lemma <ref> and the proved claim above,   $\gr(A, \F) \cong k\langle X\rangle/I^*$ is finitely generated and

$$\gkdim \gr(A, \F) = \gkdim k\langle X\rangle/I^* = \#(\N_{I^*}) = \#(\N_I).$$

Therefore, $\gkdim A = \gkdim \gr(A, \F) = \#(\N_I)$ by <cit.>.

To detect the homological properties of $K\langle X\rangle/ I$ with $I$ Lyndon, we need some preparations.

Let $u\in \langle X\rangle$ be a Lyndon word of length $\geq 2$. If $v$ is a Lyndon factor of $u$, then $v$ is either a factor of $u_L$, or a factor of $u_R$, or a prefix of $u$ with $|v|> |u_L|$.

We only need to exclude the possibility that there are factorizations $u_L=pl,\, v=lr,\, u_R=rq$ with $p,l,r\neq 1$. Otherwise, one would have a proper Lyndon suffix $lu_R$ of $u$ by Proposition <ref> (L1), which contradicts the assumption that $u_R$ is the longest proper Lyndon suffix of $u$.

We call a set of words on $X$ an antichain if it contains no  proper factors of any of its elements, and call a set of Lyndon words on $X$  closed if  it  contains all Lyndon factors of any of its elements.
For a closed set $U$ and an antichain $V$ of Lyndon words on $X$, let

\begin{align*}
\Phi_{\mathbb{L}}(U) &:= \left \{\, v\in \L\backslash U ~ | ~ \text{every proper Lyndon factors of $v$ belongs to $U$} \, \right \}  \\
\Psi_{\mathbb{L}}(V) &:= \{\ u\in \L ~|~V \text{ contains no  factor of } u\ \}.
%\\ \overline{\Phi}_{\mathbb{L}}(U) &:=\left  \{ \, v\in \L \backslash U  ~| ~ |v|=1 \text{ or } |v|\geq 2 \text{ but } v_L , v_R \in  U\, \right \},  \\
%\Upsilon_{\mathbb{L}}(U) &:= \left\{\, (u,v)\in U\times U \left | \begin{array}{l} u>_{\rm lex} v \text{ and there exists no }  \\w \in U \text{ such that}\, u>_{\rm lex}w>_{\rm lex}v\end{array} \right. \, \right\}.
\end{align*}

Clearly, $\Phi_{\mathbb{L}}(U)$ is an antichain and $\Psi_{\mathbb{L}}(V)$ is closed, and

\begin{equation*}\label{minimal-closed-correspondence}
\Phi_\mathbb{L} \big (\Psi_\mathbb{L}(V)\big) =V  \quad \text{ and } \quad \Psi_\mathbb{L} \big (\Phi_\mathbb{L}(U)\big) =U. %\tag{MC}
\end{equation*}

Note that for any ideal $I$ of $k\langle X\rangle$,  $\N_I$ is a closed set of Lyndon words and $\OO_I$ is an antichain of words. Moreover, one has $\Phi_\mathbb{L}(\N_I)= \OO_I\cap\mathbb{L}$ and $\Psi_\mathbb{L}(\OO_I\cap\mathbb{L}) =\N_I$.

Let $U$ be a closed set of  Lyndon words on $X$. Then for each pair $u,v\in U$ with $u>_{\lex} v$, if there's no $w\in U$ such that $u >_{\lex}w>_{\lex} v$ then

\[
\sh(uv)=(u,v) \quad \text{ and }\quad uv\in \Phi_\mathbb{L}(U).
\]

Consequently, if $U$ is finite then $\#(\Phi_{\mathbb{L}}(U) \backslash X) \geq \#(U) - 1$.

The equality $\sh(uv)=(u,v)$ is a direct consequence of Proposition <ref> (L3) because obviously  $u_R \leq_{\rm lex} v$ when $|u|\geq 2$.  Assume $uv\not\in \Phi_\mathbb{L}(U)$. Since $u>_{\rm lex}uv>_{\rm lex}v$, $uv\not\in U$. Thus $\Phi_\mathbb{L}(U)$ contains a word $w$ that is a proper Lyndon factor of $uv$.  By Lemma <ref>, $w$ is a prefix of $uv$  and $|w|> |u|$. If $|w_L|<|u|$ then $u>_{\rm lex}w_R >_{\rm lex} v$, a contradiction; if $|w_L|=|u|$ then  $u=w_L>_{\rm lex} w_R >_{\rm lex} v$, a contradiction; and if $|w_L|>|u|$ then $u>_{\rm lex} w_L  >_{\rm lex} v$, a contradiction too. The last statement is clear.

Let $V$ be an antichain of words on $X$ and let $p\geq 2$ be an integer. A $p$-ambiguity on $V$  is a word $w\in \langle X\rangle$ which has a decomposition
$w=v_1 v_2\cdots v_{p+1}$ such that

* $v_1\in X \backslash V$ and $v_2,\ldots, v_{p+1}$ are nonempty words that have no factors in $V$;

* for all $i$, $v_iv_{i+1}$ has a factor in $V$ but $v_it$ has no factor in $V$ for any proper prefix $t$ of $v_{i+1}$.

Note that $w$ has at most one decomposition as above. We shall write $\mathcal{A}_{0}(V)=\{1\}$, $\mathcal{A}_{1}(V)=X\backslash V$, $\mathcal{A}_{2}(V)= V\backslash X$,  and  write $\mathcal{A}_n(V)$ for the set of all $(n-1)$-ambiguities on $V$ for $n\geq 3$.

Let $V$ be an antichain of Lyndon words on $X$ and let $U=\Psi_{\mathbb{L}}(V)$. Then

* $\mathcal{A}_n(V)=\emptyset$ for $n>\#(V\backslash X)+1$.

* $\mathcal{A}_n(V) \subseteq \{\, u_1u_2\cdots u_{n} ~ | ~ u_1,\ldots, u_{n}\in U, \, u_1>_{\rm lex} \cdots >_{\rm lex} u_{n}  \, \}$ for $n\geq 1$.

* $\mathcal{A}_n(V) \supseteq \left\{\, u_1 u_2\cdots u_{n}  \left | \begin{array}{l} u_1,\ldots, u_{n}\in U, \, u_1>_{\rm lex} \cdots >_{\rm lex} u_{n} \text{ but }\\
\not\exists ~ w \in U  \text{ with }\, u_i>_{\rm lex}w>_{\rm lex}u_{i+1} \text{ for some } i
\end{array} \right. \, \right\}$ for $n\geq 2$.

(1) The case that $V\backslash X=\emptyset$  is clear.  So let us assume $V\backslash X\neq \emptyset$. For $n\geq 3$ with  $\mathcal{A}_n(V)\neq \emptyset$, choose an element
$w\in \mathcal{A}_n(V)$  with the required decomposition $w=v_1 v_2\cdots v_{n}$. Let $w_i=s_iv_{i+1}$ be the unique suffix of $v_iv_{i+1}$ that lies in $V$ for $i=1,\ldots, n-1$. Note that  $s_i$ is a nonempty suffix of $v_i$. So

\[
w_1>_{\rm lex} s_2 >_{\rm lex} w_2 >_{\rm lex} s_3>_{\rm lex} \cdots >_{\rm lex} s_{n-1} >_{\rm lex} w_{n-1}
\]

by Proposition <ref>. Consequently, $n\leq \#(V\backslash X)+1$ and then the result follows.

(2) The cases that $n=1$ and $n=2$ are clear. Suppose $n\geq 3$ and let $w\in \mathcal{A}_n(V)$ be with the required decomposition $w = v_1v_2\cdots v_{n}$.   Let $t_{n+1} =1$, and then recursively define $u_i$ to be the longest Lyndon suffix of $v_it_{i+1}$ and define $t_i$ by $v_it_{i+1} = t_iu_i$ for $i=n, n-1, \cdots, 1$. By construction,  $u_n\in U$ and

\[
w=v_1v_2\cdots v_n t_{n+1}= v_1\cdots v_{n-1}t_n u_n = \cdots =t_1u_1\cdots u_n.
\]
We claim that

\[|u_{1}| > |t_{2}|, \ldots, |u_n|>|t_{n+1}| \quad \text{and} \quad u_{1}>_{\rm lex} \cdots >_{\rm lex}u_n.\]

It follows that $|t_1|<|v_1|,\ldots, |t_n|<|v_n|$. So $u_1,\cdots, u_{n-1}\in U$, $t_1=1$ and hence $w= u_1u_2\cdots u_n.$

Now we proceed to show the claim above.  For $i\in \{1,\ldots, n-1\}$, let $w_i=s_iv_{i+1}$ be the unique suffix of $v_iv_{i+1}$ that lies in $V$. Note that $s_i$ is a nonempty suffix of $v_i$. Obviously, one has $|u_n|>|t_{n+1}|$. Assume $l\in \{1,\ldots, n-1\}$ such that $|u_{l+1}| > |t_{l+2}|, \ldots, |u_n|>|t_{n+1}|$ and  $u_{l+1}>_{\rm lex} \cdots >_{\rm lex}u_n$. Since $u_{l+1} = a_{l+1}t_{l+2}$ for some nonempty suffix $a_{l+1}$ of $v_{l+1}$,  it follows that $w_lt_{l+2} = s_l v_{l+1}t_{l+2}$ is a  Lyndon word by Proposition <ref> (L1). Let $z_l$ be the shortest Lyndon  suffix of $w_lt_{l+2}$ that are of length greater than $ |u_{l+1}|$. By the construction of $u_{l+1}$, one has $|z_l|> |v_{l+1} t_{l+2}|$, $(z_l)_R = u_{l+1}$ and  $(z_l)_L$ is a Lyndon suffix of $v_lt_{l+1}$ of length greater than $t_{l+1}$. By the construction of $u_l$, it contains $(z_l)_L$ as a suffix. Consequently,  $|u_l| \geq  |(z_l)_L| >|t_{l+1}|$ and $u_l\geq_{\rm lex} (z_l)_L >_{\rm lex} (z_l)_R= u_{l+1}$. The claim then follows by induction.

(3) Let $u_1, \ldots,  u_{n} \in U$ with $u_1>_{\rm lex} \cdots >_{\rm lex} u_{n}$ but there's no $w\in U$ between $u_i$ and $u_{i+1}$ in lexicographical order for each $i=1,\ldots, n-1$.  By Lemma <ref>, one has

$$u_iu_{i+1} \in \Phi_\mathbb{L}(U) = V, \quad i=1,\ldots, n-1.$$
The case that $n=2$ is then clear. For $n\geq 3$, we write $u_1=xs_1$ with $x$ a letter. To see that  $u_1u_2\cdots u_n = x (s_1u_2) u_3\cdots u_{n}$ is an $(n-1)$-ambiguity on $V$, it remains to show that $s_1u_2r$ has no factor in $V$ for any proper prefix $t$ of $u_3$. Otherwise,  there is a nonempty suffix $l$ of $s_1$ and a nonempty prefix $r$ of $u_3$ such that $w=lu_2r\in V$. By Lemma <ref>, either $w_L = lu_2r'$ or $w_R= l'u_2r$. Accordingly, one has $u_1>_{\rm lex } w_L >_{\rm lex } u_3$ or $u_1>_{\rm lex }w_R >_{\rm lex} u_3$, which is impossible because $u_2\not \in \{w_L, w_R\}$ but $u_2$ is the unique element of $\Psi_{\mathbb{L}}(V)$ that lie lexicographic  strictly between $u_1$ and $u_3$.

Let $I$ be a Lyndon ideal of $k\langle X\rangle$ and let $A= k\langle X\rangle/ I$.

* The projective dimension of $A$ as an $A$-bimodule, the  left global dimension of $A$ and the right global dimension of $A$ are all less than or equal to $\min\{ \, \#(\N_I), ~  \#(\OO_I\backslash X) +1 \, \}$.

* If $\N_I$ is finite then $A$ is homologically smooth in the sense that $A$ has a bounded projective resolution as an $A$-bimodule with each term finitely generated as an $A$-bimodule.

By the  Anick resolution of $A$ as an $A$-bimodule (see <cit.>), there is a projective resolution of $A$ in the category of $A$-bimodules of the form:

\begin{equation*}\label{Anick-resolution}
\big ( \cdots \to A\otimes k\mathcal{A}_3(V) \otimes A \xrightarrow{\delta_3} A\otimes k\mathcal{A}_2(V) \otimes A \xrightarrow{\delta_2} A\otimes k\mathcal{A}_1(V) \otimes A \xrightarrow{\delta_1}   A\otimes A \to 0 ~  \big ) ~ \xlongrightarrow{\mu} ~  A,  \tag{AR}
\end{equation*}

where $V:=\OO_I$ and $\mu:A\otimes A\to A$ is the multiplication map. By assumption, $V$ consists of Lyndon words and $\Psi_{\mathbb{L}} (V) =\N_I$. By  Lemma <ref> (1,2), the  projective dimension of $A$ as an $A$-bimodule  is less than or equal to $ \min\{ \, \#(\Psi_{\mathbb{L}}(V)), ~  \#(V \backslash X)+1 \, \}$.
It is easy to check that the left and right global dimensions of $A$ are both less than or equal to the  the  projective dimension of $A$ as an $A$-bimodule. If $\N_I$ is finite, the Anick resolution tells us that $A$ is homologically smooth.

Let $I$ be a homogeneous Lyndon ideal of $k\langle X\rangle$ with $\N_I$ finite. Let $A:= k\langle X\rangle/ I$.

* $A$ is homologically smooth in the graded sense.

* $\uExt_{A\otimes A^o}^d (A, k) = \uExt_A^d({}_Ak,{}_Ak) = \uExt_A^d(k_A,k_A) = k(l)$, where $d=\#(\N_I)$ and $l=\sum_{u\in \N_I} \deg(u)$ and the notation  $(l)$ is the degree $l$-shifting on $\mathbb{Z}^s$-graded modules.

* The projective dimension of $A$ as an $A$-bimodule, the  left  global dimension of $A$ and the right global dimension of $A$ all equal to $d=\#(\N_I)$.

Let $\N_I=\{\, u_1<_{\rm lex} \cdots <_{\rm lex} u_d \, \}$ and $V:=\OO_I$. By construction, all differentials $\delta_n$ in the Anick resolution (<ref>) may be chosen to  preserve degrees (see <cit.>).  So $A$ is homologically smooth in the graded sense. This proves Part (1).  By Lemma <ref> (2,3), one has
$\mathcal{A}_n(V) = \emptyset$ for $n\geq d+1$, $\mathcal{A}_{d} (V) = \{\, u_1u_2\cdots u_d\}$ and $\mathcal{A}_{d-1}(V) \subseteq \{\, u_1\cdots \widehat{u_i}\cdots u_d ~|~ i=1,\ldots, d \,\}$. It follows that

{\rm im}~ \delta_d \subseteq A_{+} \otimes  k\mathcal{A}_{d-1}(V) \otimes A + A \otimes k\mathcal{A}_{d-1}(V) \otimes A_{+}.

So  $\uHom_{A\otimes A^o}(\delta_d, k)=0$ and hence

\uExt_{A\otimes A^o}^d(A, k) = \uHom_{A\otimes A^o}(A\otimes k(-l)\otimes A, k) =  k(l).

Apply the functor $-\otimes_A{}_Ak$ (resp. $k_A\otimes_A-$) on the two-sided Anick resolution  (<ref>), one obtains a projective resolution of ${}_Ak$ (resp. $k_A$) in the category of  $\mathbb{Z}^s$-graded left (resp. right) $A$-modules. Using these resolutions, a similar argument as that for the two-sided case yields that

$$\uExt_A^d({}_Ak,{}_Ak) = \uExt_A^d(k_A,k_A)=k(l).$$
This proves Part (2). Part (3) is a direct consequence of Proposition <ref> (1) and Part (2).

Finally, we relate  Lyndon ideals to Artin-Schelter regular algebras, which  play an important role in the realm of noncommutative algebraic geometry. Recall that
a connected $\Gamma$-graded algebra $A$ is called Artin-Schelter regular (AS-regular, for short) of dimension $d$ if

* $A$ has finite global dimension $d$;

* $A$ has finite Gelfand-Kirillov dimension;

* $A$ is Gorenstein; that is,
$\uExt^i_A(k_A,A)=\left\{\begin{array}{ll}0,&i\neq d,\\k(l),& i=d,\end{array}\right.$ for some $l\in\Gamma$.

The  index $l$ is called the Gorenstein parameter of $A$.

Let $k\langle x_1,\ldots, x_n\rangle$ be $\mathbb{N}$-graded by $\deg(x_i) =1$. Let $I$ be a homogeneous Lyndon ideal of $k\langle x_1,\ldots, x_n\rangle$ contains no linear polynomial and let $A:=k\langle x_1,\ldots, x_n\rangle/I$.
Assume that $A$ is AS-regular of global dimension $d$ and Gorenstein parameter $l$. Then

\[
n\leq d \leq l \leq F_{d-n+3} +n-3,
\]

where $F_{r}$ denotes the $r$-th Fibonacci number for $r\geq 0$.

By the assumption, Proposition <ref>  and Theorem <ref> (2),
$\N_I  \supseteq \{x_1,\ldots, x_n\}$ and $\#(\N_I) =d$. Enumerating elements in $\N_I$ in the graded lex order as

x_1 <_{\glex} \cdots <_{\glex} x_{n-2} <_{\glex} x_{n-1}=u_0 <_{\glex} x_n=u_1 <_{\glex} u_2<_{\glex} \cdots <_{\glex} u_{d-n+1}.

Then $\deg(u_i)\leq F_i$ for $i=0,\ldots,d-n+1$ as showed in <cit.>. It follows that

$$n\leq d\leq  \sum_{u\in \N_I} \deg(u) \leq  n-2 + \sum_{i=0}^{d-n+1} F_i = F_{d-n+3}+n-3.$$

The equality is by the formula $\sum_{i=0}^r F_i = F_{r+2} -1$, which can be simply proved by induction on $r$.
By Proposition <ref> (3 b), $l =\sum_{u\in \N_I} \deg(u) $, the result follows.

A  $\Gamma$-graded algebra $A$ is called properly $\Gamma$-graded if  the support $\{~\gamma\in \Gamma ~|~A_\gamma\neq 0~\}$ spans $\Gamma$ as an abelian monoid. The following result is a restatement of <cit.>.

Let $A$ be an AS-regular connected properly $\mathbb{N}^2$-graded algebra with  two generators. Assume that $A$ is a domain of global dimension $\leq 4$ or a domain of global dimension $5$ and GK dimension $\geq 4$. Then there is a homogeneous Lyndon  ideal $I$ of $k\langle x_1,x_2\rangle$ such that $A\cong k\langle x_1,x_2\rangle/I$ as $\mathbb{N}^2$-graded algebras. Here, $k\langle x_1,x_2\rangle $ is $\mathbb{N}^2$-graded by $\deg(x_1)=(1,0)$ and $\deg(x_2)=(0,1)$. $\Box$

[1] F. W. Anderson, K. R. Fuller, Rings and categories of modules, second edition, Graduate Texts in Mathematics, Vol. 13, Springer-Verlag New York, (1992).

[2] N. Andruskiewitsch, H.-J. Schneider, Lifting of quantum linear spaces and
pointed Hopf algebras of order $p^3$, J. Alg. 209 (1998), 658–691.

[3] M. Artin, J. Tate, M. Van den Bergh, Modules over regular algebras of dimension $3$, Invent. Math. 106 (1991), 335-388.

[4] A. Berenstein, J. Greenstein, Primitively generated Hall algebras, Pacific J. Math. 281 (2016), 287-331.

[5] K. A. Brown, P. Gilmartin, Quantum homogeneous spaces of connected Hopf algebras, J. Alg. 454 (2016), 400-432.

[6] K. A. Brown, P. Gilmartin, J. J. Zhang, Connected (graded) Hopf algebras, Trans. Amer. Math. Soc. 372 (2019), 3283-3317.

[7] K. A. Brown, S. O'Hagan, J. J. Zhang, G. Zhuang, Connected Hopf algebras and iterated Ore extensions, J. Pure Appl. Alg.  219 (2015), 2405-2433.

[8] K. A. Brown, J. J. Zhang, Dualizing complexes and twisted Hochschild (co)homology for noetherian Hopf algebras, J. Alg. 320 (2008), 1814-1850.

[9] K. A. Brown, J. J. Zhang,  Iterated Hopf Ore extensions in positive characteristic, J. Noncommut. Geom. 16 (2022), 787–837.

[10] S. Chouhy, A. Solotar, Projective resolutions of associative algebras and ambiguities, J. Alg.  432 (2015), 22-61.

[11] M. Demazure, P. Gabriel, Groupes Algébriques I, North Holland, Ansterdam, (1970).

[12] K. Erdmann, Ø. Solberg, X. Wang, On the structure and cohomology ring of connected Hopf algebras, J. Alg. 527 (2019), 366–398.

[13] V. O. Ferreira, L. S. I. Murakami,  A. Paques, A Hopf-Galois correspondence for free algebras, J. Alg. 276 (2004), 407–416.

[14] T. Gateva-Ivanova, Global dimension of associative algebras, in: proc. AAECC-6, LNCS, 357 (1989), 213-229.

[15]T. Gateva-Ivanova, Algebras defined by Lyndon words and Artin-Schelter regularity, Trans. Amer. Math. Soc. Ser. B 9 (2022), 648-699.

[16]T. Gateva-Ivanova, G. Fløystad, Monomial algebras defined by Lyndon words, J. Alg. 403 (2014), 470-496.

[17] I. Heckenberger, H.-J. Schneider, Right coideal subalgebras of Nichols algebras and the Duflo order on the Weyl groupoid, Israel J. Math. 197 (2013), 139-187.

[18] I. Heckenberger, H.-J. Schneider, Hopf algebras and root systems, Mathematical surveys and Monographs, Vol. 247, American Mathematical Society, Rhode Island, (2020).

[19] V. K. Kharchenko, A quantum analogue of Poincaré-Birkhoff-Witt theorem, Alg. Log. 38 (1999), 259-276.

[20] V. K. Kharchenko, PBW-bases of coideal subalgebras and a freeness theorem, Trans. Amer. Math. Soc. 360 (2008), 5121-5143.

[21] V. K. Kharchenko, Right coideal subalgebras in $U_q^+(\mathfrak{s}\mathfrak{o}_{2n+1})$, J. Eur. Math. Soc. 13 (2011), 1677-1735.

[22] V. K. Kharchenko, A. V. L. Sagahon,  Right coideal subalgebras in $U_q(\mathfrak{s}\mathfrak{l}_{n+1})$, J. Alg. 319 (2008), 2571-2625.

[23] U. Krähmer, On the Hochschild (co)homology of quantum homogeneous spaces, Israel J. Math. 189 (2012), 237–266.

[24] G. R. Krause, T. H. Lenagan, Growth of algebras and Gelfand-Kirillov dimension, revised edition, Graduate Studies in Mathematics, Vol. 22, American Mathmatical Society, Rhode Island, (1999).

[25] B. Leclerc, Dual canonical bases, quantum shuffles and $q$-characters, Math. Z. 246 (2004), 691–732.

[26] G. Letzter, Symmetric pairs for quantized enveloping algebras, J. Alg. 220 (1999), 729-767.

[27] G. Letzter, Coideal subalgebras and quantum symmetric pairs, in: S. Montgomery, H.-J. Schneider (Eds.) New directions in Hopf algebras, MSRI Publications, 43 (2002), 117-165.

[28] C.-C. Li, G.-S. Zhou, The structure of connected (graded) Hopf algebras revisited, J. Alg. 610 (2022), 684-702.

[29] L.-Y. Liu, Q.-S. Wu, Rigid dualizing complexes of quantum homogeneous spaces, J. Alg. 353 (2012), 121-141.

[30] M. Lothaire, Combinatorics on words, Encyclopedia in mathematics and its
applications, 17 GC Rota, Editor Addison-Wesley Publishing Company, (1983).

[31] G. Lusztig, Finite-dimensional Hopf algebras arising from quantized enveloping algebras, J.
Amer. Math. Soc. 3 (1990), 257–296.

[32] A. Masuoka, On Hopf algebras with cocommutative coradicals, J. Alg. 144 (1991), 451-466.

[33] J. W. Milnor, J. C. Moore, On the structure of Hopf algebras, Ann. Math. 81 (1965), 211-264.

[34] E. Müller, H.-J. Schneider, Quantum homogeneous spaces with faithfully flat module structures, Israel J. Math. 111 (1999), 157–190.

[35] Van C. Nguyen, L. Wang, X. Wang, Primitive deformations of quantum p-groups, Algebr.
Represent. Theory 22 (2019), 837-865.

[36] P. Nordbeck, Cononical bases for algebraic computations, Phd Thesis, Lund University, (2001).

[37] B. Pogorelsky, Right coideal subalgebras of the quantum Borel algebra of type $G_2$, J. Alg. 322 (2009), 2335–2354.

[38] D. E. Radford, The structure of Hopf algebras with a projection, J. Alg. 92  (1985), 322–347.

[39] M. Reyes, D. Rogalski, J. J. Zhang, Skew Calabi-Yau algebras and homological identities, Adv. Math. 264 (2014), 308-354.

[40] C. M. Ringel, PBW-bases of quantum groups, J. Reine Angew. Math. 470 (1996), 51–88.

[41] S. Skryabin, Projectivity and freeness over comodule algebras, Trans. Amer. Math. Soc. 359 (2007), 2597–2623.

[42] M. Takeuchi, Survey of braided Hopf algebras, New trends in Hopf algebra theory (La Falda, 1999), Contemp. Math., vol. 267, Amer. Math. Soc., Providence, RI, (2000), 301–323.

[43] M. Takeuchi, Relative Hopf modules - equivalences and freeness criteria, J. Alg. 60 (1979), 452-471.

[44] S. Ufer, PBW bases for a class of braided Hopf algebras, J. Alg.  280 (2004), 84-119.

[45] D.-G. Wang, J. J. Zhang, G. Zhuang, Connected Hopf algebras of Gelfand-Kirillov dimension four, Trans. Amer. Math. Soc. 367 (2015), 5597-5632.

[46] W. Wang, Quamtum symmetric pairs, to appear in Proceedings of ICM 2022, arXiv: 2112.10911.

[47] T. Yanai, Galois correspondence theorem for Hopf algebra actions, in: Algebraic structures
and their representations, 393–411, Contemporary Mathematics, vol. 376, AMS, Providence, RI, (2005).

[48] G.-S. Zhou, An application of Lyndon words in associative algebras (Chinese), Appl. Math. J. Chinese Univ. Ser. A 30 (2015), 245-252.

[49] G.-S. Zhou, D.-M. Lu, Artin-Schelter regular algebras of dimension five with two generators, J. Pure Appl. Alg. 218 (2014), 937-961.

[50] G.-S. Zhou, Y. Shen, D.-M. Lu,  The structure of connected (graded) Hopf algebras,  Adv. Math. 372 (2020), 107292.

[51] G. Zhuang, Properties of pointed and connected Hopf algebras of finite Gelfand-Kirillov dimension, J. Lond. Math. Soc. 87 (2013), 877-898.


# Classification of Spam URLs Using Machine Learning Approachs

Omar Husni Odeh  An-Najah National University  Anas Arram  Department of
Computer Science, Birzeit University  Murad Njoum  Department of Computer
Science, Birzeit University

(April 2021)

###### Abstract

The Internet is used by billions of users every day because it offers fast and
free communication tools and platforms. Nevertheless, with this significant
increase in usage, huge amounts of spam are generated every second, which
wastes internet resources and, more importantly, users’ time. This study
investigates the use of machine learning models to classify URLs as spam or
non-spam. We first extract the features from the URL as it has only one
feature, and then we compare the performance of several models, including
k-nearest neighbors, bagging, random forest, logistic regression, and others.
We find that bagging achieves the best accuracy, with an accuracy of 96.5%.
This suggests that bagging is a promising approach for classifying URLs as
spam or non-spam.

###### Index Terms:

Spam, URL, dataset, machine learning, model, KNeighbors, bagging, random
forest, logistic regression, classifier

##  I Introduction

The Internet is an open space for everyone to freely create content, publish
it, and share it with others. In the last decade, internet access has
increased tremendously. This increase in audience came with some side effects.
Too many ads and spam are being shared everywhere, whether it is email or any
other type of social media. Platforms like email clients which are used by
hundreds of millions of users every day struggle to effectively filter the
content to the end user, [1][2].

Blacklist is one of the common methods used to identify malicious URLs.
Although blacklisting has been effective for many URLs, the rapid increase in
these URLs makes it an insufficient method. Therefore, Machine learning
techniques have been proposed to address this issue [3]. These techniques can
detect malicious websites, even if they have never been encountered before. In
the context of this discussion, machine learning (ML) refers to the field of
computer algorithms that autonomously enhance their performance through
experiential learning and data analysis [4, 5]. Because ML models possess the
capability to comprehend the underlying structural patterns within URLs, they
provide more insightful methods for classifying URLs [6, 7, 8].

In this study, we want to investigate the use of machine learning models to
classify URLs that are most likely spam. The model’s input and output are
pretty straightforward; it will take a URL and it will classify it as spam or
not. Since we are taking only one feature as an input, we will need to analyze
and extend this feature to extract more information about the URL to determine
its characteristic, [9, 10]. In addition, we will build multiple machine
learning models, with different parameters to evaluate different options, and
finally to come up with the best model that can result in the highest possible
accuracy.

The paper is organized into five sections. Section 2 covers related works in
spam URLs. Section 3 presents the proposed ML models, while Section 4
discusses the obtained results. Finally section 5 concludes the paper.

##  II Literature review

URL spam detection is a modernistic field that form a solid interest for both
organizations and researchers. It started to receive more and more attention
from researchers due to the major evolving and exposing that happened on the
internet over the past few years. Previous work on this topic has involved
analysis of the URL and the page itself.

Oshingbesan _et al_ , 2023, [11] examined different ML models to classify
malicious websites across different datasets. From their results, K-Nearest
neighbor performs the best in classifying malicious URLs. One the otherside,
other models like random forest, decision trees, logistic regression, and
support victor machine, outperform the baseline models across all dataset.

Murat Koca _et al_ , 2022, [12] investigated the use of different ML models
for classifying the URLs. These models include Logistic Regression, Neural
Networks, and multiple Naive Bayes Algorithms. The results showed that the
Naive Bayes model performed noticeably better than both the logistic
regression and neural network approaches across all tested dataset.

Gyongyi and Garcia-Molina, 2005, [9], attempted to classify the web spam into
smaller buckets, such as the URL spam, redirection, and keywords stuffed in
the link. While splitting and categorizing the spam into some specific buckets
will likely improve the classifier ability to detect spams, their paper
focused on building a general classifier for all different types of spam.

Ntoulas, Najork, Manasse, and Fetterly, 2006, [13], studied and analyzed the
content of the page itself, and it typically included creating and extracting
features from the HTML structure of the page, JavaScript, and links, such as
the number of the words on the page, and the average length of words, and the
number of words in both title and body. Other feature extraction methods
involved looking at the percentage of hidden content, which is not visible to
the user who is browsing a specific page.

Egele, Kolbitsch, and Platzer, 2009, [14], had another approach which starts
by determining the important features in terms of their rank in a search
engine and then find the features that are most likely to be used by spammers.
The problem of this approach is that it is infeasible to enumerate all ranking
element, and thus, some important features may be missed.

Boser, Guyon, and Vapnik 1992, [15], said that all the models are based on
SVMs, which is known to perform well in classification tasks, Joachims 1998,
[16, 17]. Their evaluation used the standard area under ROC curve metric over
a K-fold cross-validation where K=10, and they used some tools provided by
libsvm Chang and Lin, 2001, [18]. The feature selection was made using
frequency count over an entire sample set. All their charts were plotted only
for feature sizes of ¡ 1000. Larger feature sizes did not significantly
improve results.

##  III Dataset and features

###  III-A Data description

To train our models, we are using URL - Spam or Not Spam - classification
dataset, Dec. 2021, [19]. The dataset contains about 148.3K URLs in which one-
third are flagged as a spam URL and the rest are not spam. It can be used to
create a binary classification model. The dataset was created by the pudding,
[20]. The dataset links were found in different newsletters. Their flagging
system identifies if a link is a spam or not, by parsing links from over 100
newsletters every 30 minutes. A link is programmatically flagged if it appears
more than three times in a single newsletter or contains a likely
subscribe/unsubscribe URL.

###  III-B Features Extraction

The dataset has only one input feature which is the URL itself. To make the
best use of these URL we need to extract as many features as we can to
understand the characteristics of the URL in order to identify some patterns
which can be useful for the machine learning models later on. Below is the
list of most important extracted features with a brief description:

TABLE I: Dataset new features Feature name | Description
---|---
url_length | The number of characters.
has_subscribe | Is the URL has the word subscribe.
contains_hash | Whether the URL has the hash letter.
num_digits | The number of digits in the URL.
non_https | Is it a secure connection.
num_words | Number of words in the URL.
entropy | The measure of disorder/uncertainty.
num_params | The number of query parameters.
num_fragments | Number of fragments in the URL.
num_subdomains | The number of sub domains.
num_%20 | Number of encoded white spaces
num_@ | Number of @ in the URL.
has_ip | Whether it’s a FQDN or IP address.

###  III-C Exploratory data analysis

Two-thirds of the used dataset are not spam URLs, which is more than 100k
URLs. The spam URL represents 32% of the data, which is about 48k URLs. Figure
1 represents the distribution of spam vs. non-spam URLs.

Fig 1: Spam URL distributions

The URL length analysis shows that most of the spam URLs have a length of less
than 100 characters as shown in the histogram below:

Fig 2: URLs length by Spam / Non spam

Another important piece of information extracted from these URLs is that the
URLs that contain subscribe words are most likely spam. There is 3% of the
input URLs have the word subscribe and almost all of them are spam. In
addition, the number of words in the spam URLs is less than 5 in the majority
of the data, unlike the non spam which is distributed over a wider range as
shown in Figure 3.

Fig 3: URL has the word subscribe Fig 4: URLs number of words by Spam / Non
spam

There is about 2.08% of the URLs that are not using secure HTTPS protocol,
1.25% of these URLs are spam which is more than 60% of the HTTP URLs knowing
that only 33% of the total data is flagged as spam. This indicates a usable
feature for the model as shown in 4.

##  IV Methods

###  IV-A Logistic regression

Even though it has the word regression, it’s a classification model rather
than a regression model. It’s a simple and efficient method especially for
binary and linear classification problems. It is a model, which that’s very
easy to realize, and it achieves a very good performance with linearly
classes. It’s an extensively algorithm for classification. The logistic
regression model is a statistical method for binary classification which can
be also generalized to multiclass classification. Scikit-learn has a highly
optimized version of logistic regression implementation, which supports
multiclass classification tasks, [21].

###  IV-B Random Forest Classifier

Random forest classifier, [21], is an ensemble method that trains multiple
decision trees in parallel with bootstrapping which is followed by
aggregation. The bootstrapping indicates that the different individual
decision trees are trained concurrently on multiple subsets of the training
dataset using different subsets of the available features. The bootstrapping
will ensure that every individual decision tree is unique, and that reduces
the overall variance of the random forest classifier. For the final decision
step, the random forest classifier aggregates the decisions of all the
individual trees; then, the classifier will exhibit good generalization.
Random forest classifier tends to outperform most other classification methods
in accuracy without having issues of overfitting. The random forest classifier
doesn’t require the feature scaling process. Even though a random forest
classifier is harder to interpret, it’s easier to tune the hyperparameter when
we compare it to a decision tree classifier. The general figure of random
forest is represented in Figure 5.

Fig 5: Random forest classifier

###  IV-C Multi layer perceptron (MLP)

MLP can be viewed as a supplement of feed-forward neural network, [22], which
consists of three different types of layers which are; the input, output, and
hidden layers. The input layer received the input signal for processing. The
prediction and classification are performed by the output layer. A number of
hidden layers that are placed between the input and the output layer are the
core engine of the MLP. Like a feed-forward network, the data flows in a
forward direction from the input to the output layer. The neurons in the MLP
are trained with the backpropagation learning algorithm. MLPs can solve
problems that are not linearly separable. The major use cases of Multi-layer
perceptron are pattern recognition, classification, approximation, and
prediction. The computations in MPL take place at every neuron in the output
and hidden layer [11]. Figure 6 shows the input, hidden and output lyers of a
MLP.

Fig 6: Multi layer perceptron

###  IV-D Gradient Boosting Classifier

Gradient Boosting is a machine learning algorithm, that’s used for both
classification and regression problems. This classifier works on the idea that
multiple weak learners can collaborate together and make a more accurate
predictor. Gradient boosting classifier works by building simpler and weak
prediction models sequentially where each model will try to predict the error
left from the previous model. That’s why this algorithm tends to over-fit
quickly.

###  IV-E Other methods

In addition to the method described previously, we used plenty of other
methods to build and train models using the input dataset. These methods are
the K-Neighbors classifier, Decision tree classifier, ADA boosting classifier,
and Naive Bayes classifiers (Bernoulli and Multinomial). All the nine
mentioned methods went through the same process from model evaluation and
finally selecting the best model.

##  V Results and discussion

In this section of the paper, we will show and discuss the results for each
model. This includes showing the tuned hyperparameters, confusion matrix, ROC,
AUC, and finally the model scores.

###  V-A Logistic regression

The logistic regression model was implemented using the following tuned
hyperparameters:

TABLE II: Logistic regression hyperparameters Parameter | Value
---|---
C | 100
class_weight | None
dual | False
fit_intercept | True
intercept_scaling | 1
l1_ratio | None
max_iter | 140
multi_class | auto
n_jobs | None
penalty | l2
random_state | None
solver | liblinear
tol | 0.0001
verbose | 0
warm_start | False

The next figure shows the ROC and AUC charts, this model has a good AUC value
equal to 0.87.

Fig 7: Logistic regression ROC and AUC

Finally, below are the scores of the model. This model shows relatively poor
results with a k-fold accuracy equal to 82% and a small R square far away from
1.

TABLE III: Logistic regression scores Metric | Result
---|---
Accuracy | 82.19%
Precision | 74.42%
Recall | 66.75%
R square | 0.18
F1 score | 70.38%
Kfold(k=5) accuracy | 82.22%

###  V-B Multi layer perceptron (MLP)

The MPL - Neural network model was tested using the following tuned
hyperparameters as in the next table.

TABLE IV: MLP hyperparameters Parameter | Value
---|---
C | 100
alpha | 0.1
batch_size | auto
beta_1 | 0.9
epsilon | 1e-08
hidden_layer_sizes | (14, 9)
learning_rate | adaptive
learning_rate_init | 0.001
max_fun | 15000
max_iter | 240
momentum | 0.9
n_iter_no_change | 10
power_t | 0.5
random_state | None
shuffle | True
solver | adam
tol | 0.0001
validation_fraction | 0.1

Below is the confusion matrix, which shows a lower number of false positives
and false negatives in the prediction compared to the logistic regression
model.

Fig 8: MLP confusion matrix

The next figure shows the ROC and AUC charts, this model has a very good AUC
value equals 0.92.

Fig 9: Multi layer perceptron ROC and AUC

Finally, below are the scores of the model:

TABLE V: Multi layer perceptron scores Metric | Result
---|---
Accuracy | 85.33%
Precision | 76.52%
Recall | 77.49%
R square | 0.32
F1 score | 77%
Kfold(k=5) accuracy | 84.26%

This model shows a better accuracy and a better r2 compared to the previous
trained model, but 84.26% it’s still not reliable for spam detection.

###  V-C KNeighbours classifier

The KNeighbours model gave it’s best results with the following tuned
hyperparameters:

TABLE VI: KNeighbours hyperparameters Parameter | Value
---|---
C | 100
algorithm | auto
leaf_size | 30
metric | minkowski
metric_params | None
n_jobs | None
n_neighbors | 1
p | 2
weights | uniform

Below is the confusion matrix, which shows a great results with few number of
both false positives and negatives. So far, it shows the best confusion
matrix.

Fig 10: KNeighbours confusion matrix

The next figure shows the ROC and AUC charts, this model has an excellent AUC
value equals 0.95.

Fig 11: KNeighbours ROC and AUC

Finally, below table presents the scores of the model. The model shows great
accuracy and a good r2 that is close to 1. Finally, we’ve crossed the 90
percent mark with +93.3% accuracy.

TABLE VII: KNeighbours scores Metric | Result
---|---
Accuracy | 95.09%
Precision | 91.16%
Recall | 93.59%
R square | 0.77
F1 score | 92.36%
Kfold(k=5) accuracy | 93.34%

###  V-D Gradient Boosting classifier

The Gradient Boosting model was used with the following tuned hyperparameters:

TABLE VIII: Gradient Boosting hyperparameters Parameter | Value
---|---
C | 100
ccp_alpha | 0.0
criterion | friedman_mse
init | None
learning_rate | 0.3
loss | deviance
max_depth | 9
min_impurity_decrease | 0.0
min_samples_leaf | 1
min_samples_split | 2
min_weight_fraction_leaf | 0.0
n_estimators | 110
subsample | 1
tol | 0.0001
validation_fraction | 0.1

Below is the confusion matrix, which shows the best results so far with a few
number of both false positives and negatives.

Fig 12: Gradient Boosting confusion matrix

The next figure shows the ROC and AUC charts, this model has an outstanding
AUC value equals 0.99.

Fig 13: Gradient Boosting ROC and AUC

Finally, below are the scores of the model. This model shows the best k-fold
accuracy = 94.54% comparing to the previous models and a very good r2 that is
very close to 1. It also shows a very high score of all other metrics such as
precision, recall, and F1 score. All measures are +90%.

TABLE IX: Gradient Boosting scores Metric | Result
---|---
Accuracy | 95.90%
Precision | 92.73%
Recall | 94.46%
R square | 0.81
F1 score | 93.59%
Kfold(k=5) accuracy | 94.54%

###  V-E Decision Tree classifier

The Decision Tree model gave it’s best results with the following tuned
hyperparameters:

TABLE X: Decision Tree hyperparameters Parameter | Value
---|---
C | 100
ccp_alpha | 0.0
class_weight | None
criterion | entropy
max_depth | 22
max_features | None
max_leaf_nodes | None
min_impurity_decrease | 0.0
min_samples_leaf | 1
min_samples_split | 2
min_weight_fraction_leaf | 0.0
random_state | None
splitter | best

Below is the confusion matrix, which shows superior results compared to the
first 2 models (MLP and Logistic regression), but it has more falsy values
than the last 2 models.

Fig 14: Decision Tree confusion matrix

The next figure shows the ROC and AUC charts, this model has an excellent AUC
value equals 0.98.

Fig 15: Decision Tree ROC and AUC

Finally, below are the scores of the model. This model shows a very good
measure with a k fold accuracy = 92.42% and a very good r2 of 1. This is the
third best model after k neighbors and gradient boosting.

TABLE XI: Decision Tree scores Metric | Result
---|---
Accuracy | 93.66%
Precision | 90.37%
Recall | 89.56%
R square | 0.71
F1 score | 89.96%
Kfold(k=5) accuracy | 92.42%

###  V-F Naive Bayes - Bernoulli

The Naive Bayes model gave it’s best results with the following tuned
hyperparameters:

TABLE XII: Naive Bayes hyperparameters Parameter | Value
---|---
C | 100
alpha | 10
binarize | 0
class_prior | None
fit_prior | True

Below is the confusion matrix, which shows a very high number of false
negatives. Overall, it shows the worst predictions so far.

Fig 16: Naive Bayes confusion matrix

The next figure shows the ROC and AUC charts, This model has a poor AUC value
equals 0.8 compared to the previous models.

Fig 17: Naive Bayes ROC and AUC

Finally, below are the scores of the model. This model shows the worst results
so far. It has a negative R2 and an accuracy below 78% which can be considered
as a bad model, especially for a binary classification.

TABLE XIII: Naive Bayes scores Metric | Result
---|---
Accuracy | 78.17%
Precision | 84.62%
Recall | 38.03%
R square | -0.01
F1 score | 52.48%
Kfold(k=5) accuracy | 78.15%

###  V-G Ada Boost Classifier

The Ada Boost model gave it’s best results with the following tuned
hyperparameters:

TABLE XIV: Ada Boost hyperparameters Parameter | Value
---|---
C | 100
algorithm | SAMME.R
base_estimator | None
learning_rate | 1.5
n_estimators | 90
random_state | None

Below is the confusion matrix, which shows a high number of both false
positives and negatives. It’s one of the three worst confusion matrices.

Fig 18: Ada Boost confusion matrix

The next figure shows the ROC and AUC charts, this model has a good AUC value
equals 0.91.

Fig 19: Ada Boost ROC and AUC

Finally, below are the scores of the model:

TABLE XV: Ada Boost scores Metric | Result
---|---
Accuracy | 84.22%
Precision | 77.21%
Recall | 71.23%
R square | 0.27
F1 score | 74.10%
Kfold(k=5) accuracy | 84.30%

This model shows a very close score to MLP classifier. The accuracy isn’t
reliable in this model for spam detection.

###  V-H Random Forest Classifier

The Random Forest model gave it’s best results comparing to the previous
models with the following tuned hyperparameters:

TABLE XVI: Random Forest hyperparameters Parameter | Value
---|---
C | 100
bootstrap | True
ccp_alpha | 0.0
class_weight | None
criterion | gini
max_depth | 23
max_features | None
max_leaf_nodes | None
max_samples | None
min_impurity_decrease | 0.0
min_samples_leaf | 1
min_samples_split | 2
min_weight_fraction_leaf | 0.0
n_estimators | 20
n_jobs | None
oob_score | False
random_state | None
verbose | 0
warm_start | False

Below is the confusion matrix, which shows the best results so far. In fact,
it shows the least number of false negatives compared to all other models.

Fig 20: Random Forest confusion matrix

The next figure shows the ROC and AUC charts, This model has an outstanding
AUC value equals 0.99 similar to gradient boosting results.

Fig 21: Random Forest ROC and AUC

Finally, below are the scores of the model:

TABLE XVII: Random Forest scores Metric | Result
---|---
Accuracy | 95.94%
Precision | 92.68%
Recall | 94.65%
R square | 0.81
F1 score | 93.66%
Kfold(k=5) accuracy | 94.64%

The random forest model shows better results compared to all previous models.
However, It showed very close and almost identical results to gradient
boosting scores with an accuracy equals 94.64%.

###  V-I Bagging Classifier

The Bagging Classifier gave it’s best results with the following tuned
hyperparameters:

TABLE XVIII: Bagging hyperparameters Parameter | Value
---|---
base_estimator | None
bootstrap | True
bootstrap_features | False
max_features | 1.0
max_samples | 1.0
n_estimators | 140
n_jobs | None
oob_score | False
random_state | None
verbose | 0
warm_start | False

Below is the confusion matrix, which shows a great results, and it has the
lowest false negatives compared to all other models.

Fig 22: Bagging confusion matrix

The next figure shows the ROC and AUC charts, this model has an excellent AUC
value equals 0.994.

Fig 23: Bagging ROC and AUC

Finally, below are the scores of the model:

TABLE XIX: Bagging scores Metric | Result
---|---
Accuracy | 96.52%
Precision | 93.26%
Recall | 95.98%
R square | 0.84
F1 score | 94.60%
Kfold(k=5) accuracy | 95.10%

This model shows the best k fold accuracy = 95.10% and a the best r2 of 0.84.
This is the best model so far.

###  V-J Stacking Classifier

The Stacking Classifier gave it’s best results with the following tuned
hyperparameters:

TABLE XX: Stacking hyperparameters Parameter | Value
---|---
final_estimator | None
n_jobs | None
passthrough | False
stack_method | auto
verbose | 0
BC | BaggingClassifier
RFC | RandomForestClassifier
DT | DecisionTreeClassifier
GBC | GradientBoostingClassifier

Below is the confusion matrix, which shows very good results compared to most
models, but it has more falsy values than the Bagging classifier.

Fig 24: Stacking confusion matrix

The next figure shows the ROC and AUC charts, this model has an excellent AUC
value equal to 0.994.

Fig 25: Stacking ROC and AUC

Finally, below are the scores of the model. This model shows a very good
measure with a k-fold accuracy = 94.82% and a very good r2 of 0.82. This is
the second-best model after the Bagging Classifier.

TABLE XXI: Stacking scores Metric | Result
---|---
Accuracy | 96.21%
Precision | 94.53%
Recall | 93.44%
R square | 0.82
F1 score | 93.98%
Kfold(k=5) accuracy | 94.82%

##  VI Models comparison

Stacking and bagging classifier show the best precision, recall and f1 scores.
On the other hand, both naive bayes models have the worst measures.

TABLE XXII: Comparison results of Precision, Recall, and F1 score Classifier | Precision | Recall | F1 score
---|---|---|---
Logistic regression | 74.42% | 66.75% | 70.38%
KNeighbours | 91.16% | 93.59% | 92.36%
Ada Boost | 77.21% | 71.23% | 74.10%
Multinominal | 54.06% | 83.07% | 65.50%
Bernoulli | 84.62% | 38.03% | 52.48%
Random forest | 92.68% | 94.65% | 93.66%
Gradient boosting | 92.73% | 94.46% | 93.59%
Multilayer perceptron | 76.52% | 77.49% | 77.00%
Bagging | 93.26% | 95.98 | 94.60%
Stacking | 94.53% | 93.44 | 93.98%
Decision tree | 90.37% | 89.56% | 89.96%
TABLE XXIII: Comparison results of Accuracy, R square, and K-fold Classifier | Accuracy | R square | K-fold
---|---|---|---
Logistic regression | 82.19% | 0.18 | 82.22%
KNeighbours | 95.09% | 0.77 | 93.34%
Ada Boost | 84.22% | 0.27 | 84.30%
Multinominal | 72.26% | -0.28 | 72.41%
Bernoulli | 78.17% | -0.01 | 78.15%
Random forest | 95.94% | 0.81 | 94.64%
Gradient boosting | 95.90% | 0.81 | 94.54%
Multilayer perceptron | 85.33% | 0.32 | 84.26%
Bagging | 96.52% | 0.84 | 95.10%
Stacking | 96.21% | 0.82 | 94.82%
Decision tree | 93.66% | 0.71 | 92.42%

  1. 1.

The top three models with the highest accuracy are Bagging with accuracy
equals 96.52% and kfold accuracy 95.1 %, then Stacking classifier with
accuracy equals 96.21% and kfold accuracy 94.82 %, and finally Random forest
with accuracy equals 95.94% and kfold accuracy 94.64 %.

  2. 2.

Both naive bayes models showed the worst accuracy numbers, they are the only
models that had an accuracy less than 80% - 72% for the multinominal and 78%
for the bernoulli.

  3. 3.

There are four models with an R square more than 0.8 which are the bagging
with r2 = 0.84, stacking with r2 = 0.82 and finally random forest and gradient
boosting. Both models had an R square equals 0.81.

  4. 4.

Bagging classifier showed the best results among all metrics, with results
around 95% in precision, recall, accuracy and F1 score.

Fig 26: Models comparison ROC and AUC

The previous chart shows a full comparison of ROC curves and AUC values
between all different models that have been experimented with and trained for
the spam URL dataset. As discussed previously, It shows that the bagging and
stacking models have the best true positive rates with the best AUC values
equaling 0.994. It also shows the worst models which are both naive bayes
models (Multinominal and Bernouli).

##  VII Conclusion

To sum up the work done and discussed in this paper, we used a dataset that
classifies the URLs to spam or not spam, analyzed the data and extracted
multiple features. Then we trained nine different machine learning models
using this dataset, and for each model, we tuned the hyperparameters of each
model and cross validated the results of each. The results showed six models
with accuracy higher than 90%. After evaluating all the models, the bagging
classifier was the winner and selected since it has the highest accuracy of
96.52%.
For a future work, we would like to train the data sets on more models like
SVM model, and we also would like to extract more features from the website of
the URL itself such as the body size of the web page and features related to
the script used as well.

## References

  * [1] W. Zhongtao, P. Xin, W. Yuling, L. Yaohua, H. Li, and C. Biao, “Analysis on the characteristics of url spam,” vol. 1, 03 2012.
  * [2] A. Arram, H. Mousa, and A. Zainal, “Spam detection using hybrid artificial neural network and genetic algorithm,” in _2013 13th International Conference on Intellient Systems Design and Applications_ , 2013, pp. 336–340.
  * [3] F. Vanhoenshoven, G. Nápoles, R. Falcon, K. Vanhoof, and M. Köppen, “Detecting malicious urls using machine learning techniques,” in _2016 IEEE Symposium Series on Computational Intelligence (SSCI)_. IEEE, 2016, pp. 1–8.
  * [4] M. I. Jordan and T. M. Mitchell, “Machine learning: Trends, perspectives, and prospects,” _Science_ , vol. 349, no. 6245, pp. 255–260, 2015.
  * [5] A. Arram, M. Ayob, and A. Sulaiman, “Hybrid bird mating optimizer with single-based algorithms for combinatorial optimization problems,” _IEEE Access_ , vol. 9, pp. 115 972–115 989, 2021.
  * [6] M. Anjaneyulu, B. Madhuravani, and P. Devika, “Detection of malicious websites using machine learning approach and web vulnerability scanner,” in _AIP Conference Proceedings_ , vol. 2492, no. 1. AIP Publishing, 2023.
  * [7] M. A. A. Albadr, M. Ayob, S. Tiun, F. T. AL-Dhief, A. Arram, and S. Khalaf, “Breast cancer diagnosis using the fast learning network algorithm,” _Frontiers in Oncology_ , vol. 13, p. 1150840, 2023.
  * [8] A. Sulaiman, K. Omar, M. F. Nasrudin, and A. Arram, “Length independent writer identification based on the fusion of deep and hand-crafted descriptors,” _IEEE Access_ , vol. 7, pp. 91 772–91 784, 2019.
  * [9] Z. Gyongyi and H. Garcia-Molina, “Web spam taxonomy,” in _First international workshop on adversarial information retrieval on the web (AIRWeb 2005)_ , 2005.
  * [10] A. Arram and M. Ayob, “A novel multi-parent order crossover in genetic algorithm for combinatorial optimization problems,” _Computers & Industrial Engineering_, vol. 133, pp. 267–274, 2019.
  * [11] S. Abirami and P. Chitra, “Energy-efficient edge based real-time healthcare support system,” in _Advances in Computers_. Elsevier, 2020, vol. 117, no. 1, pp. 339–368.
  * [12] K. Murat, A. İsa, and M. A. S. AL-HAYANİ, “Classification of malicious urls using naive bayes and genetic algorithm,” _Sakarya University Journal of Computer and Information Sciences_ , vol. 6, no. 2, pp. 80–90, 2023\.
  * [13] A. Ntoulas, M. Najork, M. Manasse, and D. Fetterly, “Detecting spam web pages through content analysis,” in _Proceedings of the 15th international conference on World Wide Web_ , 2006, pp. 83–92.
  * [14] M. Egele, C. Kolbitsch, and C. Platzer, “Removing web spam links from search engine results,” _Journal in Computer Virology_ , vol. 7, no. 1, pp. 51–62, 2011.
  * [15] B. E. Boser, I. M. Guyon, and V. N. Vapnik, “A training algorithm for optimal margin classifiers,” in _Proceedings of the fifth annual workshop on Computational learning theory_ , 1992, pp. 144–152.
  * [16] T. Joachims, “Text categorization with support vector machines: Learning with many relevant features,” in _European conference on machine learning_. Springer, 1998, pp. 137–142.
  * [17] D. Albashish, H. M. Mustafa, R. A. Khurma, B. Hasan, S. Bani-Ahmad, A. Abdullah, and A. Arram, “Enhanced meta-heuristic methods for industrial winding process modelling,” _Expert Systems_ , p. e13438.
  * [18] W. Tsai, C. Chang, M. Lin, S. Chien, H. Sun, and M. Hsieh, “Adsorption of acid dye onto activated carbons prepared from agricultural waste bagasse by zncl2 activation,” _Chemosphere_ , vol. 45, no. 1, pp. 51–58, 2001.
  * [19] S. Bansal, “Spam urls classification dataset,” 2021. [Online]. Available: https://www.kaggle.com/shivamb/spam-url-prediction
  * [20] T. pudding. (2021) The pudding. [Online]. Available: https://pudding.cool/
  * [21] A. Subasi, _Practical Machine Learning for Data Analysis Using Python_ , 06 2020\.
  * [22] S. Misra, H. Li, and J. He, _Machine learning for subsurface characterization_. Gulf Professional Publishing, 2019.