Parametrized Quantum Circuits of Synonymous Sentences in Quantum Natural Language Processing
AAbbaszadeh et al.
RESEARCH
Parametrised Quantum Circuits of SynonymousSentences in Quantum Natural LanguageProcessing
Mina Abbaszadeh , Seyyed Shahin Mousavi and Vahid Salari * Correspondence:[email protected] Department of Physics, IsfahanUniversity of Technology, ,84156-83111 Isfahan, IranFull list of author information isavailable at the end of the article
Abstract
In this paper we develop a compositional vector-based semantics of positivetransitive sentences in quantum natural language processing for a non-Englishlanguage, i.e. Persian, to compare the parametrised quantum circuits of twosynonymous sentences in two languages, English and Persian. By consideringgrammar+meaning of a transitive sentence, we translate DisCoCat diagram viaZX-calculus into quantum circuit form. Also we use a bigraph method to rewriteDisCoCat diagram and turn into quantum circuit in the semantic side.
Introduction
Natural language processing (NLP) is a subgroup of linguistics and artificial intelli-gence used for language interactions between computers and human, e.g. program-ming computers to analyze natural language data with large volumes. A computercan understand the meanings and concepts of the texts in documents, recognisesspeech, and generates natural language via NLP. In fact, NLP was proposed firstin 1950 by Alan Turing [1] i.e. now called the Turing test as a criterion of intelli-gence for automated interpretation and generation of natural language. Recently agroup of researchers at OpenAI have developed Generative Pre-trained Transformer3 (GPT-3) language model [2], as the largest non-sparse language model with highernumber of parameters and a higher level of accuracy versus previous models withcapacity of ten times larger than that of Microsoft’s Turing-NLG to date. On the a r X i v : . [ qu a n t - ph ] F e b bbaszadeh et al. Page 2 of 20 other side, some quantum approaches for NLP have been developed that may reachsome quantum advantages over classical counterparts in future [3, 4]. Protocols forquantum Natural Language Processing (QNLP) have two aspects: semantic andsyntax. Both aspects are performed by a mathematical framework. Compact closedcategories are used to provide semantics for quantum protocols [5]. The use of quan-tum maps for describing meaning in natural language was started by Bob Coecke[6]. Coecke has introduced diagrammatic language to speak about processes andhow they compose [7]. The diagrammatic language of non-commutative categori-cal quantum logic represents reduction diagrams for sentences, and allows one tocompare the grammatical structures of sentences in different languages. Sadrzadehhas used pregroups to provide an algebraic analysis of Persian sentences [8]. Pre-groups are used to encode the grammar of languages. One can fix a set of basicgrammatical roles and a partial ordering between them, then freely can generate apregroup of these types [6]. The category of finite dimensional vector spaces andpregroups are monoidal categories. Models of the semantic of positive and negativetransitive sentences are given in ref. [6]. Moreover, Frobenius algebras are used tomodel the semantics of subject and object relative pronouns [9]. Brian Tyrrell [10]has used vector space distributional compositional categorical models of meaningto compare the meaning of sentences in Irish and in English. Here, we use vector-based models of semantic composition to model the semantics of positive transitivesentences in Persian. According to [3] the DisCoCat diagram is simplified to someother diagram and is turned into a quantum circuit, which can be compiled via noisyintermediate-scale (NISQ) devices. The grammatical quantum circuits are spannedby a set θ . The meaning of the words and hence whole sentence are encoded inthe created semantic space. Finally, we rewrite the diagram as a bipartite graph toturn a quantum circuit. ZX-calculus, like a translator, turns a linguistic diagraminto a quantum circuit. According to [11] we consider both grammar and meaningof a grammatical sentence in Persian and turn DisCoCat diagram into a quantumcircuit form. bbaszadeh et al. Page 3 of 20
In this section, we provide some content, which will be used throughout this paper.See the references [9] and [6] for more details.
Definition 1.1
A category C consists of: • a class obj ( C ) , called the class of objects; • for every two objects A, B a class C ( A, B ) of morphisms; it is convenient toabbreviate f ∈ C ( A, B ) by f : A → B ; • for every two morphisms f ∈ C ( A, B ) and g ∈ C ( B, C ) , a morphism g ◦ f ∈C ( A, C ) . These must satisfy the following properties, for all objects A, B, C, D and all morphisms f ∈ C ( A, B ) , g ∈ C ( B, C ) , h ∈ C ( C, D ) : h ◦ ( g ◦ f ) = ( h ◦ g ) ◦ f ; • for every object A there is an identity morphism A ∈ C ( A, A ) ; for f ∈ C ( A, B ) we have B ◦ f = f = f ◦ A Definition 1.2
A monoidal category is a category C with the following properties: • a functor ⊗ : C × C → C , called the tensor product and we have ( A ⊗ B ) ⊗ C = A ⊗ ( B ⊗ C ); • there is a unit object I such that I ⊗ A = A = A ⊗ I ; • for each ordered pair morphisms f ∈ C ( A, C ) , g ∈ C ( B, D ) we have f ⊗ g : A ⊗ B → C ⊗ D such that ( g ⊗ g ) ◦ ( f ⊗ f ) = ( g ◦ f ) ⊗ ( g ◦ f ) . Monoidal categories are used to encode semantic and syntax of sentences in dif-ferent languages. bbaszadeh et al.
Page 4 of 20
Definition 1.3
A symmetric monoidal category is a monoidal category C such thatthe tensor product is symmetric. This means that there is a natural isomorphism η such that for all objects A, B ∈ C , A ⊗ B η A,B (cid:47) (cid:47) B ⊗ A is an isomorphism. Graphical language is a high-level language for researching in quantum processes,which has applications in many areas such as QNLP and modelling quantum cir-cuits.
According to [6], morphisms are depicted by boxes, with input and output wires.For example, the morphisms1 A f g ◦ f f ⊗ g where f : A → B and g : B → C, are depicted as follows:A f AB g ABC f AB gBCf States and effects of an object A are defined as follows, respectively from left toright: ψ : I → A π : A → Iψ π bbaszadeh et al.
Page 5 of 20
Definition 1.4
A compact closed category is a monoidal category where for eachobject A there are objects A r and A l , and morphisms η l : I → A ⊗ A l , η r : I → A r ⊗ A, (cid:15) l : A l ⊗ A → I, (cid:15) r : A ⊗ A r → I such that: • (1 A ⊗ (cid:15) l ) ◦ ( η l ⊗ A ) = 1 A • ( (cid:15) r ⊗ A ) ◦ (1 A ⊗ η r ) = 1 A • ( (cid:15) l ⊗ A l ) ◦ (1 A l ⊗ η l ) = 1 A l • (1 A r ⊗ (cid:15) r ) ◦ ( η r ⊗ A r ) = 1 A r . The above equations are called yanking equations. In the graphical language the η maps are depicted by caps, and (cid:15) maps are depicted by cups [6]. The yankingequation results in a straight wire . For example, the diagrams for η l : I → A ⊗ A l , (cid:15) l : A l ⊗ A → I and ( (cid:15) l ⊗ A l ) ◦ (1 A l ⊗ η l ) = 1 A l are as follows, respectively fromleft to right: = AA A l A l A l Definition 1.5
As defined in [6], a partially ordered non-commutative monoid P is called a pregroup, to which we refer as P reg . Each element p ∈ P has both aleft adjoint p l ∈ P and a right adjoint p r ∈ P . A partially ordered monoid is aset ( P, . , , ≤ , ( − ) l , ( − ) r ) with a partial order relation on P and a binary operation − · − : P × P → P that preserves the partial order relation. The multiplication hasthe unit , that is p = 1 .p = p. . Explicitly we have the following axioms: (cid:15) lp = p l .p ≤ , (cid:15) rp = p.p r ≤ , η lp = 1 ≤ p.p l , η rp = 1 ≤ p r .p We refer the above axioms as reductions.
Preg and
FVect as compact closed categories
P reg is a compact closed category. Morphisms are reductions and the operation“ . ” is the monoidal tensor of the monoidal category. As mentioned in [6], the bbaszadeh et al.
Page 6 of 20 category
P reg can be used to encoding the grammatical structure of a sentencein a language. Objects and morphisms are grammatical types and grammaticalreductions, respectively. The operation “ . ” is the juxtaposition of types. Accordingto [9], let
F V ect be the category of finite dimensional vector spaces over the field ofreals R . F V ect is a monoidal category, in which vector spaces, linear maps and thetensor product are as objects, morphisms and the monoidal tensor, respectively. Inthis category the tensor product is commutative, i.e. V ⊗ W ∼ = W ⊗ V , and hence V l ∼ = V r ∼ = V ∗ , where V l , V r and V ∗ are left adjoint, right adjoint and a dual spaceof V . We consider a fixed base, so we have an inner-product. Consider a vectorspace V with base {−→ e i } i . Since V is an inner product space with finite dimension, V ∗ ∼ = V . Therefore V r ∼ = V l ∼ = V , η l = η r : R → V ⊗ V (cid:55)→ (cid:88) i −→ e i ⊗ −→ e i and (cid:15) l = (cid:15) r : V ⊗ V → R (cid:88) ij c ij −→ v i ⊗ −→ w j (cid:55)→ (cid:88) ij c ij (cid:104)−→ v i | −→ w j (cid:105) . Consider the monoidal functor F : P reg → F V ect, which assigns the basic typesto vector spaces as follows: F ( n ) = N F ( s ) = S F (1) = I, and also F ( x ⊗ y ) = F ( x ) ⊗ F ( y ). The compact structure is preserved by Monoidalfunctors; this means that F ( x r ) = F ( x l ) = F ( x ) ∗ for more details see [9]. bbaszadeh et al. Page 7 of 20
The simple declarative Persian sentence with a transitive verb has the followingstructure:subject + object + objective sign + transitive verb. For example, the following isthe Persian sentence for ‘sara bought the book’.Persian: Sara ketab ra kharid.English: Sara bought the book.In this sentence, ‘Sara’ is the subject, ‘ketab’ is the direct object, ‘ra’ is theobjective sign and ‘kharid’ is the transitive verb in simple past tense, see [8].
Vector spaces and pregroups are used to assign meanings to words and grammaticalstructure to sentences in a language. The reductions and types are interpretedas linear maps and vector spaces, obtained by a monoidal functor F from P reg to F V ect . In this paper we present one example from persian: positive transitivesentence, for which we fix the following basic types,n: nouns: declarative statemento: objectAccording to [6] if the juxtaposition of the types of the words in a sentence reducesto the basic type s, the sentence is called grammatical. We use an arrow → for ≤ and drop the “ . ” between juxtaposed types. The example sentence ‘sara ketab rakharid’, has the following type assignment by [8]:Sara ketab ra kharid. n n ( n r o ) ( o r n r s )Which is grammatical because of the following reduction: nn ( n r o )( o r n r s ) → n n r s → s Reductions are depicted diagrammatically, that of the above is: bbaszadeh et al.
Page 8 of 20 n n n r o o r n r s (1)A positive sentence with a transitive verb in Persian has the pregroup type nn ( n r o )( o r n r s ). The interpretation of a transitive verb is computed as follows: F ( o r ⊗ n r ⊗ s ) = F ( o r ) ⊗ F ( n r ) ⊗ F ( s ) = F ( o ) r ⊗ F ( n ) r ⊗ F ( s ) = F ( o ) ∗ ⊗ F ( n ) ∗ ⊗ F ( s ) = N ⊗ N ⊗ S So the meaning vector of a Persian transitive verb is a vector in N ⊗ N ⊗ S. Thepregroup reduction of a transitive sentence is computed as follows: F (( (cid:15) rn ⊗ s ) ◦ (1 n ⊗ (cid:15) rn ⊗ (cid:15) ro ⊗ n ⊗ s )) =( F ( (cid:15) rn ) ⊗ F (1 s )) ◦ ( F (1 n ) ⊗ F ( (cid:15) rn ) ⊗ F ( (cid:15) ro ) ⊗ F (1 s ) =( F ( (cid:15) n ) ∗ ⊗ F (1 s )) ◦ ( F (1 n ) ⊗ F ( (cid:15) n ) ∗ ⊗ F ( (cid:15) o ) ∗ ⊗ F (1 s ) =( (cid:15) N ⊗ S ) ◦ (1 N ⊗ (cid:15) N ⊗ (cid:15) N ⊗ N ⊗ S )and depicted as:The distributional meaning of ‘Sara ketab ra kharid’ is as follows: F (( (cid:15) rn ⊗ s ) ◦ (1 n ⊗ (cid:15) rn ⊗ (cid:15) ro ⊗ n ⊗ s ))( −−→ sara ⊗ −−−→ ketab ⊗ −→ ra ⊗ −−−−→ kharid )where −→ ra is the vector corresponding to the meaning of ‘ra’. We set −→ ra = (cid:88) i −→ e i ⊗ −→ e i ∈ N ⊗ N bbaszadeh et al. Page 9 of 20 and in this case we have −→ ra (cid:39) η N : R → N ⊗ N. We obtain diagrammatically: subject object verb
Which by the diagrammatic calculus of compact closed categories [12], is equalto: subject object verb
Consider the vector Ψ in the tensor space which represents the type of verb:Ψ = (cid:88) ijk c ijk −→ w i ⊗ −→ v j ⊗ −→ s k ∈ N ⊗ N ⊗ S where for each i , −→ w i is the meaning vector of object and −→ v j is the meaning vectorof subject. Then( (cid:15) N ⊗ S ) ◦ (1 N ⊗ (cid:15) N ⊗ N ⊗ S )( −→ v ⊗ −→ w ⊗ −→ Ψ ) =( (cid:15) N ⊗ S ) ◦ (1 N ⊗ (cid:15) N ⊗ N ⊗ S )( −→ v ⊗ −→ w ⊗ ( (cid:88) ijk c ijk −→ w i ⊗ −→ v j ⊗ −→ s k )) =( (cid:15) N ⊗ S )( −→ v ⊗ (cid:104) w, w i (cid:105) ⊗ −→ v j ⊗ −→ s k ) = (cid:88) ijk c ijk (cid:104) w, w i (cid:105)(cid:104) v, v j (cid:105)−→ s k . bbaszadeh et al. Page 10 of 20
According to [9] we let N to be the vector space spanned by a set of individuals {−→ n i } and S to be the one dimensional space spanned by the unit vector −→ Ψ ∈ N ⊗ N ⊗ S is represented as follows: Ψ := (cid:88) ji −→ n j ⊗ −→ n i ⊗ ( α ji −→ −→ sub = (cid:80) i −→ n i , −→ obj = (cid:80) j −→ n j and α ji ’s are degrees of truth, i.e. −→ n i Ψ ’s −→ n j with degree α ji , for all i, j . For −→ sub = (cid:80) k −→ n k and −→ obj = (cid:80) l −→ n l , where k and l range over the sets of basis vectors representing the respective common nouns, thetruth-theoretic meaning of a transitive sentence is computed as follows: −−−−−−−−−−−−−→ sub obj ra verb = ( (cid:15) N ⊗ S ) ◦ (1 N ⊗ (cid:15) N ⊗ N ⊗ S )( −→ sub ⊗ −→ obj ⊗ −−→ verb )= ( (cid:15) N ⊗ S ) ◦ (1 N ⊗ (cid:15) N ⊗ N ⊗ S )( (cid:88) k −→ n k ⊗ (cid:88) l −→ n l ⊗ ( (cid:88) ji −→ n j ⊗ −→ n i ⊗ α ji −→ (cid:88) kl α kl −→ . For concrete instantiation in the model of Grefenstette and Sadrzadeh [13] thevectors are obtained from corpora and the scalar weights for noun vectors are notnecessarily 1 or 0. For any word vector −−−→ word = (cid:80) c wordi −→ n i , the scalar weight c wordi is the number of times that the word has appeared in that context. Where −→ n i ’s arecontext basis vectors. The meaning of the transitive sentence is: −−−−−−−−−−−−−→ sub obj ra verb = (cid:88) jit (cid:104)−→ obj | −→ n j (cid:105)(cid:104)−→ sub | −→ n i (cid:105) c jit −→ s t A transitive verb is represented as a two dimensional matrix. The correspondingvector of this matrix is −−→ verb = (cid:80) ji c ji ( −→ n j ⊗ −→ n i ) . Note that the sum of the tensorproduct of the objects and subjects of the verb throughout a corpus represents themeaning vector of the verb. So the meaning of the transitive sentence is: bbaszadeh et al.
Page 11 of 20 −−−−−−−−−−−−−→ sub obj ra verb = (cid:88) ji (cid:104)−→ obj | −→ n j (cid:105)(cid:104)−→ sub | −→ n i (cid:105) c ji ( −→ n j ⊗ −→ n i )= (cid:88) ji c objj c subi c ji ( −→ n j ⊗ −→ n i ) . The meaning vector is decomposed to point-wise multiplication of two vectors asfollows: ( (cid:88) ji c objj c subi ( −→ n j ⊗ −→ n i )) (cid:12) ( (cid:88) ji c ji ( −→ n j ⊗ −→ n i ))= ( −→ obj ⊗ −→ sub ) (cid:12) −−→ verb where (cid:12) is the point-wise multiplication. As mentioned in the previous sections a sentence in a corpus is parsed accordingto its grammatical structure. According to [3] we simplify the DisCoCat diagramto some other diagram and turn into a quantum circuit, which can be compiled viaNISQ devices. Two methods are presented for this purpose. The bigraph methodand snake removal method. Both methods are done in the symmetric version of thepregroup grammar. We consider the grammatical sentence from (1),
Sara ketab ra kharid (2)and use a bigraph method to turn the diagram (2) into a bipartite graph. Words atodd distance from the root word are transposed into effects: bbaszadeh et al.
Page 12 of 20 kharidketab ra Sara (3)Transposition turns states into effects, see [12]. According to [3], we considerCNOT+U(3) of unitary qubit ansatze. Layers of CNOT gates between adjacentqubits with layers of single-qubits rotations in Z and X form unitary quantum cir-cuits. Let ˆ P be the symmetric version of the pregroup grammar P . Consider themonoidal functor from ˆ P to fHilb, in which word states are mapped to the stateansatze. State ansatze are obtained by applying the unitary ansatze to the pauli Z | (cid:105) state. Word effects are mapped to the effect ansatze, in which effect ansatzeare obtained by transposing the state ansatze in the computational basis, and wirecrossing are mapped to swaps. Now consider the diagram (3). If each wire is mappedto a qubit, the circuit has about four CNOTs. In ZX-calculus [14], suppose single-qubits white and black dots are rotations in pauli Z and pauli X. A CNOT gate isBlack and white dots connected by a horizontal line: bbaszadeh et al. Page 13 of 20 ketab (cid:55)→ θ θ sara := sara (cid:55)→ θ θ ra (cid:55)→ θ θ θ θ θ θ θ θ = θ θ θ θ θ θ θ θ One can use the bigraph algorithm to form quantum circuits of the semantic sideof the meaning. In the pregroup type of the sentence ‘Sara ketab ra kharid’ set o = n . For atomic types n and s consider two qubits and one qubit respectively.The number of qubits for each type t is the sum of the number of qubits associatedto all atomic types in t . For example the transitive verb ‘kharid’ has five qubits.For each word in the sentence we have a quantum circuit as follows: bbaszadeh et al. Page 14 of 20
The quantum circuit of the whole sentence is as follows:The reduction diagram of the sentence ‘sara bought the book’ in English is: n n r s n l n n l n So the quantum circuit of the whole sentence is as follows: bbaszadeh et al.
Page 15 of 20
The two sentences ‘Sara Ketab ra kharid’ and ‘Sara bought the book’ have thesame meaning but are grammatically different. We expect the above two circuits tohave the same output. According to [11] we present grammar+meaning as quantumcircuit for the above two sentences. Consider the states | ψ n s (cid:105) and | ψ n o (cid:105) correspondto the subject and the object, respectively. Also a transitive verb as a map η tv thattakes | ψ n s (cid:105) ∈ C and | ψ n o (cid:105) ∈ C and produces | ψ n s .n o .tv (cid:105) ∈ C k , diagrammatically: kharid = kharid So | ψ kharid (cid:105) ∈ C ⊗ C ⊗ C k . Because the quantum model relies on the tensorproduct, an exponential blow-up occurs for meaning spaces of words. In order toavoid this obstacle in experiments decrease the dimension of the spaces in whichmeanings of transitive verbs live. For the transitive verb, instead of state in the largespace | ψ kharid (cid:105) ∈ C ⊗ C ⊗ C k consider state in a smaller space | ψ ∗ kharid ∗ (cid:105) ∈ C ⊗ C , diagrammatically: (cid:55)→ kharid ∗ kharid ∗ Then copy each of the wires and bundle two of the wires together to make up thethick wire. Thus ‘kharid’ is obtained: ∗ kharid ∗ For more details see [11]. Now inter Sara and Ketab into the picture: bbaszadeh et al.
Page 16 of 20 ∗ kharid ∗ KetabSara = ∗ kharid ∗ KetabSara
We Pull some spiders out: ∗ kharid ∗ KetabSara (4)and by Using the Choi-Jamiolkowski correspondence we obtain: ∗ kharid ∗ KetabSara ∗ kharid ∗ KetabSara = (5)The circuit (4) requires 4 qubits and has two CNOT-gates in parallel, but thecircuit (5) requires 3 qubits and has sequential CNOT-gates. Indeed, the use ofthe Choi-Jamiolkowski correspondence has reduced the number of qubits, but hasincreased the depth of the CNOT-gates. As mentioned in [11] ion trap hardwarehas less qubits, but performs better for greater circuit depth. In ZX-calculus andvia Euler decomposition any one-qubit unitary gate is represented as follows: bbaszadeh et al.
Page 17 of 20 βαγ
Each verb is represented by an unitary gate U and has different values α, β and γ .So we obtain: UKetabSara KetabSara = βαγ By considering the singular value decomposition for the verb we obtain:
KetabSara Pβαγβ (cid:48) α (cid:48) γ (cid:48) bbaszadeh et al. Page 18 of 20
Where the state P is the diagonal of the matrix. We represent all noun states bygates: α (cid:48) + γα s β s α k β k αβγ (cid:48) α p β (cid:48) For the sentence ‘sara bought the book’ we obtain the DisCoCat diagram asfollows:
Bought BookSara that is equal to:
Bought BookSara (6)Indeed we ignore ‘the’ and ‘ra’ of positive transitive sentences in English andPersian respectively. Therefore according to [11] the parametrised quantum circuitof the diagram (6) is as follows: bbaszadeh et al.
Page 19 of 20 α (cid:48) + γα S β S α B β B αβγ (cid:48) α P β (cid:48) This paper extended the compact categorical semantics to analyse meanings ofpositive transitive sentences in Persian. It is necessary to introduce linear maps torepresent the meaning of negative transitive sentences and grammatically more com-plex sentences in Persian. In this work the two sentences ’Sara ketab ra kharid’ (inPersian) and ’Sara bought the book’ (in English) are instantiated as parametrisedquantum circuits. The meaning of the two sentences are the same but the appearenceof the obtained quantum circuits are different. These circuits need to be compiledcorrectly, thus it is necessary to introduce a test measurement at the terminal of thecircuits to give almost similar results for the meaning of the synonymous sentencesin different languages. As a future prospect one may use the compiler t | ket (cid:105) to thisaim, and run the circuits on the IBMQ and analyze the results. Authors’ information [email protected]@ehu.eus bbaszadeh et al.
Page 20 of 20
Author details Department of Physics, Isfahan University of Technology, , 84156-83111 Isfahan, Iran. Pure MathematicsDepartment, Shahid Bahonar University of Kerman, Kerman, Iran. Department of Physical Chemistry, Universityof Basque Country UPV/EHU, Apdo. 644, 48080 Bilbao, Spain.
References
1. Turing, A.: Computing machinery and intelligence. Mind , 433–460 (1950)2. Brown, e.a. TB: Language models are few-shot learners. arXiv, 2005–14165 (2020)3. Meichanetzidis, K., Gogioso, S., Felice, G.D., Chiappori, N., Toumi, A., Coecke, B.: Quantum natural languageprocessing on near-term quantum computers (2020). arXiv:2005.04147, 20204. O’Riordan, L., Doyle, M., Baruffa, F., Kannan, V.: A hybrid classical-quantum workflow for natural languageprocessing. Mach. Learn.: Sci. Technol. , 015011 (2020)5. Abramsky, S., Coecke, B.: A categorical semantics of quantum protocols. In: 19th Annual IEEE Symposium onLogic in Computer Science, pp. 415–425 (2004)6. Coecke, B., Sadrzadeh, M., Clark, S.: Mathematical foundations for a compositional model of meaning.Linguistic Analysis , 345–384 (2010)7. Coecke, B.: Quantum picturalism. Contemporary physics , 59–83 (2010)8. Sadrzadeh, M.: Pregroup analysis of persian sentences. In: C. Casadio and J. Lambek, Editors, ComputationalAlgebraic Approaches to Natural Language. Polimetrica, 2006 (2006)9. Sadrzadeh, M., Clark, S., Coecke, B.: The frobenius anatomy of word meaning i: subject and object relativepronouns. Journal of Logic and Computation23