A Minimalist Model and Computational Toolkit for Code Switching