( ( ( Oppositely charged ) ions ) ( ( ( attract ( -LRB- ( and ( ( ( ions ( of ( the ( same charge ) ) ) ) ( repel ( each other ) ) ) -RRB- ) ) ) ) ( ( the ( same way ) ) ( that ( ( ( opposite poles ) ( of magnets ) ) ( attract ( one ( another ( -LRB- ( ( and ( ( like poles ) ( ( repel one ) another ) ) ) -RRB- ) ) ) ) ) ) ) ) ) . ) )
(ROOT (S (NP (ADJP (RB Oppositely) (VBN charged)) (NNS ions)) (VP (VBP attract) (PRN (-LRB- -LRB-) (CC and) (VP (VBZ ions) (PP (IN of) (NP (DT the) (JJ same) (NN charge))) (S (VP (VB repel) (NP (DT each) (JJ other))))) (-RRB- -RRB-)) (SBAR (NP (DT the) (JJ same) (NN way)) (IN that) (S (NP (NP (JJ opposite) (NNS poles)) (PP (IN of) (NP (NNS magnets)))) (VP (VBP attract) (NP (NP (CD one)) (ADJP (DT another) (PRN (-LRB- -LRB-) (NP (CC and) (PP (IN like) (NP (NNS poles))) (NP (NP (QP (CD repel) (CD one))) (NP (DT another)))) (-RRB- -RRB-)))))))) (. .)))
Oppositely charged ions attract (and ions of the same charge repel each other) the same way that opposite poles of magnets attract one another (and like poles repel one another).
(ROOT (S (NP (JJ Opposite) (NNS charges)) (VP (VBP attract) (NP (CD one) (DT another))) (. .)))