Computing a simple decomposable model from any interaction model