# Hand: Domain adaptation

Hand is able to recognize a wide range of mathematical expressions. Some of them are quite ambiguous to interpret. For example, the number 2 might be confused with letter z, number 5 with letter S or the letter x versus letter X and the operator ×.

Hand is able to recognize a wide range of mathematical expressions. Some of them are quite ambiguous to interpret. For example, the number 2 might be confused with letter z, number 5 with letter S or the letter x versus letter X and the operator ×.

In order to increase accuracy, it is possible to parametrize the mathematical domain. Hand can recognize several mathematical symbols (numbers. letters, operators, etc), and these symbols can be arranged composing different structures (sub/superscripts, radicals, matrices, etc). Therefore, the adaptation of Hand to different domains is achieved by constraining the symbols and structures to take into account.

## Adaptation to Elementary Math

Imagine that we want to use Hand in primary education. In this case, complex expressions like integrals, limits or matrices are not expected. Consequently, we can specify a reduced set of mathematical symbols and structures to configure Hand, for example, using the following parameters:

hand.setParams({'constraints': { 'symbols':["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "=", "+", "-", "/", "\u00D7", "\u00F7", ",", ".", "\u221A", "(", ")"] , 'structure':["General","Fractions","Radicals"] } });

The previous example configuration will allow Hand to recognize multiple operations between numbers, fractions and radicals.

## Domain Adaptation

If Hand is going to be used in a specific field of math notation, it is possible to constrain the set of mathematical symbols and structures that it has to take into account using the following parameters:

hand.setParams({'constraints': { 'symbols':[list of symbols] , 'structure':[list of structures] } });

we specify the set of accepted symbols and structures that Hand should detect. The symbols contraints is simply a list of the allowed symbols in unicode. The structural constraints are a list of keywords representing different domains. The list of available symbols and structures are detailed below.

## Symbol Constraints

Currently, Hand accepts the following set of symbols:

0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |

a | A | α | b | B | β | c | C | . | · |

, | ; | … | : | cos | cm | d | D | dm | δ |

Δ | ÷ | / | e | E | ξ | = | ≡ | ≈ | ∃ |

f | F | ∀ | g | G | γ | Γ | ≥ | > | h |

H | i | I | ∈ | ∞ | ∫ | j | J | k | K |

κ | l | L | λ | Λ | ≤ | lim | log | { | [ |

( | < | m | M | mol | μ | n | N | η | ≠ |

o | O | p | P | ρ | φ | Φ | π | Π | ψ |

Ψ | ± | ′ | q | Q | r | R | → | ← | ⇌ |

⇄ | } | ] | ) | s | S | σ | Σ | sin | √ |

∑ | ∏ | t | T | τ | tan | θ | Θ | u | U |

v | V | ν | w | W | ω | Ω | x | X | χ |

× | y | Y | z | Z | ζ | frac | | | - | ! |

+ | ~ | ^ | ° | € | $ | £ | % | ‰ | ∂ |

∇ | ε | ∅ | ∪ | ∩ | ⊂ | ⊃ | ⊆ | ⊇ | ℙ |

ℕ | ℤ | ℚ | ℂ | ℝ | ⇒ | ∧ | ∨ | ∆ | # |

We expect this list to gradually increase in the number of symbols recognized.