Thank you Nick. It worked when I followed your guidance.

bash-3.2$ java -classpath 
/Users/ohjihyun/tika-1.7/tika-core/src/main/resources/:tika-app-1.8-SNAPSHOT.jar
 org.apache.tika.cli.TikaCLI --detect 
/Users/ohjihyun/Desktop/matlab_sample/BARCAST_MainCode.m
text/x-matlab

As you recommended, I will create a new JIRA for the detection problem, 
attaching the small files. 

Ji-Hyun

________________________________________
From: Nick Burch [[email protected]]
Sent: Thursday, May 21, 2015 2:27 PM
To: [email protected]
Subject: Re: Detecting problem with Matlab source code by using 
custom—mimetypes.xml

On Thu, 21 May 2015, Oh, Ji-Hyun (398K-Affiliate) wrote:
> The second one starts with this:
>
> %% CONTROL CODE FOR FULLY BAYESIAN SPATIO-TEMPORAL TEMPERATURE RECONSTRUCTION
> %EVERYTHING IS MODULAR TO ALLOW FOR EASY DEBUGGING AND ADAPTATION
> % _vNewModel_Oct08: change the formalism to reflect new model (Beta_1 now
> % normal). Allows for multiple proxies
> clear all; close all;

Is this file both small and one you can contribute to the project? If so,
your best bet is to raise a new JIRA for the detection problem, and attach
the small problematic file there so we can look to fix the detection

> And I did :
> Java -classpath 
> /Users/ohjihyun/tika-1.7/tika-core/src/main/resources/org/apache/tika/mime:tika-app-1.8-SNAPSHOT.jar
>  org.apache.tika.cli.TikaCLI --detect 
> /Users/ohjihyun/Desktop/matlab_sample/BARCAST_MainCode.m

That won't work, you need to give the path to the root of the resource
file tree, eg

Java -classpath 
/Users/ohjihyun/tika-1.7/tika-core/src/main/resources/:tika-app-1.8-SNAPSHOT.jar
 org.apache.tika.cli.TikaCLI --detect 
/Users/ohjihyun/Desktop/matlab_sample/BARCAST_MainCode.m

Nick

Reply via email to